Examples of provisionGroup()


Examples of com.saasovation.identityaccess.domain.model.identity.Tenant.provisionGroup()

    public void testUserIsNotInRole() throws Exception {
        Tenant tenant = this.tenantAggregate();
        User user = this.userAggregate();
        DomainRegistry.userRepository().add(user);
        Role managerRole = tenant.provisionRole("Manager", "A manager role.", true);
        Group group = tenant.provisionGroup("Managers", "A group of managers.");
        DomainRegistry.groupRepository().add(group);
        managerRole.assignGroup(group, DomainRegistry.groupMemberService());
        DomainRegistry.roleRepository().add(managerRole);
        Role accountantRole = new Role(user.tenantId(), "Accountant", "An accountant role.");
        DomainRegistry.roleRepository().add(accountantRole);
View Full Code Here

Examples of com.saasovation.identityaccess.domain.model.identity.Tenant.provisionGroup()

    @Transactional
    public Group provisionGroup(ProvisionGroupCommand aCommand) {
        Tenant tenant = this.existingTenant(aCommand.getTenantId());

        Group group =
                tenant.provisionGroup(
                        aCommand.getGroupName(),
                        aCommand.getDescription());

        this.groupRepository().add(group);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.