Search in sources :

Example 1 with RevokeRightRequest

use of com.zimbra.soap.admin.message.RevokeRightRequest in project zm-mailbox by Zimbra.

the class RevokeRight method handle.

@Override
public Element handle(Element request, Map<String, Object> context) throws ServiceException {
    ZimbraSoapContext zsc = getZimbraSoapContext(context);
    RevokeRightRequest rrReq = JaxbUtil.elementToJaxb(request);
    RightModifier rightModifier = GrantRight.getRightModifier(rrReq.getRight());
    // right checking is done in RightCommand
    RightCommand.revokeRight(Provisioning.getInstance(), getAuthenticatedAccount(zsc), rrReq.getTarget(), rrReq.getGrantee(), rrReq.getRight().getValue(), rightModifier);
    Element response = zsc.createElement(AdminConstants.REVOKE_RIGHT_RESPONSE);
    return response;
}
Also used : ZimbraSoapContext(com.zimbra.soap.ZimbraSoapContext) Element(com.zimbra.common.soap.Element) RightModifier(com.zimbra.cs.account.accesscontrol.RightModifier) RevokeRightRequest(com.zimbra.soap.admin.message.RevokeRightRequest)

Aggregations

Element (com.zimbra.common.soap.Element)1 RightModifier (com.zimbra.cs.account.accesscontrol.RightModifier)1 ZimbraSoapContext (com.zimbra.soap.ZimbraSoapContext)1 RevokeRightRequest (com.zimbra.soap.admin.message.RevokeRightRequest)1