use of com.zimbra.cs.account.accesscontrol.AllowedAttrs in project zm-mailbox by Zimbra.
the class TestACLAttrRight method verify.
private void verify(Account grantee, Entry target, GetOrSet getOrSet, AllowedAttrs expected) throws Exception {
// 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());
verifyEquals(expected, allowedAttrs);
}
use of com.zimbra.cs.account.accesscontrol.AllowedAttrs 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();
}
}
Aggregations