Package org.jtalks.common.security.acl

Examples of org.jtalks.common.security.acl.GroupAce


    }

    private GroupAce buildGroupAce(Entity entity, JtalksPermission permission, boolean isGranting, Acl acl, Sid sid) {
        AccessControlEntry accessControlEntry = new AccessControlEntryImpl(entity.getId(), acl, sid, permission,
                isGranting, false, false);
        return new GroupAce(accessControlEntry);
    }
View Full Code Here


        Mockito.when(accessControlEntry.getPermission()).thenReturn(permission);
        return accessControlEntry;
    }

    private GroupAce createGroupAce(BranchPermission permission, boolean isGranted) {
        GroupAce groupAce = Mockito.mock(GroupAce.class);
        Group group = Mockito.mock(Group.class);
        List<User> users = new ArrayList<>();
        users.add(user);
        Mockito.when(group.getUsers()).thenReturn(users);
        Mockito.when(groupAce.getGroup(groupDao)).thenReturn(group);
        Mockito.when(groupAce.isGranting()).thenReturn(isGranted);
        Mockito.when(groupAce.getPermission()).thenReturn(permission);
        return groupAce;
    }
View Full Code Here

TOP

Related Classes of org.jtalks.common.security.acl.GroupAce

Copyright © 2018 www.massapicom. 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.