use of com.zimbra.soap.admin.type.GranteeSelector in project zm-mailbox by Zimbra.
the class TestLockoutMailbox method grantRightToAdmin.
private static void grantRightToAdmin(SoapProvisioning adminSoapProv, TargetType targetType, String targetName, String granteeName, String rightName) throws ServiceException {
GranteeSelector grantee = new GranteeSelector(GranteeType.usr, GranteeBy.name, granteeName);
EffectiveRightsTargetSelector target = null;
if (targetName == null) {
target = new EffectiveRightsTargetSelector(targetType, null, null);
} else {
target = new EffectiveRightsTargetSelector(targetType, TargetBy.name, targetName);
}
RightModifierInfo right = new RightModifierInfo(rightName);
GrantRightResponse grResp = adminSoapProv.invokeJaxb(new GrantRightRequest(target, grantee, right));
assertNotNull("GrantRightResponse for " + right.getValue(), grResp);
}
use of com.zimbra.soap.admin.type.GranteeSelector in project zm-mailbox by Zimbra.
the class TestUtil method grantRightToAdmin.
public static void grantRightToAdmin(SoapProvisioning adminSoapProv, TargetType targetType, String targetName, String granteeName, String rightName) throws ServiceException {
GranteeSelector grantee = new GranteeSelector(com.zimbra.soap.type.GranteeType.usr, GranteeBy.name, granteeName);
EffectiveRightsTargetSelector target = null;
if (targetName == null) {
target = new EffectiveRightsTargetSelector(targetType, null, null);
} else {
target = new EffectiveRightsTargetSelector(targetType, TargetBy.name, targetName);
}
RightModifierInfo right = new RightModifierInfo(rightName);
GrantRightResponse grResp = adminSoapProv.invokeJaxb(new GrantRightRequest(target, grantee, right));
assertNotNull("GrantRightResponse for " + right.getValue(), grResp);
}
Aggregations