use of com.zimbra.soap.admin.message.GrantRightResponse in project zm-mailbox by Zimbra.
the class TestServerEnumeration 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.message.GrantRightResponse in project zm-mailbox by Zimbra.
the class TestDomainAdmin method grantRight.
private void grantRight(SoapProvisioning soapProv, TargetType targetType, String targetName, GranteeType granteeType, String granteeName, String rightName) throws ServiceException {
GranteeSelector grantee;
EffectiveRightsTargetSelector target;
RightModifierInfo right;
GrantRightResponse grResp;
grantee = new GranteeSelector(granteeType, GranteeBy.name, granteeName);
target = new EffectiveRightsTargetSelector(targetType, TargetBy.name, targetName);
right = new RightModifierInfo(rightName);
grResp = soapProv.invokeJaxb(new GrantRightRequest(target, grantee, right));
assertNotNull("GrantRightResponse for " + right.getValue(), grResp);
}
use of com.zimbra.soap.admin.message.GrantRightResponse 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.message.GrantRightResponse 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