Search in sources :

Example 6 with Grantee

use of com.zimbra.cs.account.accesscontrol.RightBearer.Grantee in project zm-mailbox by Zimbra.

the class TestACL method verify.

protected void verify(Account grantee, Entry target, GetOrSet getOrSet, AllowedAttrs expected) {
    try {
        // call RightChecker directly instead of mAM, we want to verify the interim result.
        AllowedAttrs allowedAttrs = getOrSet.isGet() ? CheckAttrRight.accessibleAttrs(new Grantee(grantee), target, AdminRight.PR_GET_ATTRS, false) : CheckAttrRight.accessibleAttrs(new Grantee(grantee), target, AdminRight.PR_SET_ATTRS, false);
        // System.out.println("========== Test result ==========\n" + allowedAttrs.dump());
        assertEquals(expected, allowedAttrs);
    } catch (ServiceException e) {
        fail();
    }
}
Also used : Grantee(com.zimbra.cs.account.accesscontrol.RightBearer.Grantee) AllowedAttrs(com.zimbra.cs.account.accesscontrol.AllowedAttrs) ServiceException(com.zimbra.common.service.ServiceException)

Aggregations

Grantee (com.zimbra.cs.account.accesscontrol.RightBearer.Grantee)6 Entry (com.zimbra.cs.account.Entry)2 Provisioning (com.zimbra.cs.account.Provisioning)2 AllowedAttrs (com.zimbra.cs.account.accesscontrol.AllowedAttrs)2 GrantsOnTarget (com.zimbra.cs.account.accesscontrol.SearchGrants.GrantsOnTarget)2 HashSet (java.util.HashSet)2 ServiceException (com.zimbra.common.service.ServiceException)1 Domain (com.zimbra.cs.account.Domain)1 Group (com.zimbra.cs.account.Group)1 NamedEntry (com.zimbra.cs.account.NamedEntry)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 SortedMap (java.util.SortedMap)1 TreeMap (java.util.TreeMap)1