public class ModifyAceServlet extends AbstractAccessPostServlet implements ModifyAce
Sling Post Servlet implementation for modifying the ACEs for a principal on a JCR resource.
Modify a principal's ACEs for the node identified as a resource by the request URL >resource<.modifyAce.html
The principalId is assumed to refer directly to an Authorizable, that comes direct from the UserManager. This can be a group or a user, but if its a group, denied permissions will not be added to the group. The group will only contain granted privileges.
Constructor and Description |
---|
ModifyAceServlet() |
Modifier and Type | Method and Description |
---|---|
protected void |
handleOperation(SlingHttpServletRequest request,
AbstractPostResponse response,
List<Modification> changes)
Extending Servlet should implement this operation to do the work
|
void |
modifyAce(javax.jcr.Session jcrSession,
String resourcePath,
String principalId,
Map<String,String> privileges,
String order)
Add or modify the access control entry for the specified user
or group.
|
createHtmlResponse, doPost, externalizePath, getAccessControlList, getItemPath, getRedirectUrl, isSetStatus
doDelete, doPut, getAllowedRequestMethods, isMethodValid, mayService
doGeneric, doGet, doHead, doOptions, doTrace, getServletInfo, handleMethodNotImplemented, service, service
protected void handleOperation(SlingHttpServletRequest request, AbstractPostResponse response, List<Modification> changes) throws javax.jcr.RepositoryException
AbstractAccessPostServlet
handleOperation
in class AbstractAccessPostServlet
request
- the sling http request to processresponse
- the responsejavax.jcr.RepositoryException
public void modifyAce(javax.jcr.Session jcrSession, String resourcePath, String principalId, Map<String,String> privileges, String order) throws javax.jcr.RepositoryException
ModifyAce
modifyAce
in interface ModifyAce
jcrSession
- the JCR session of the user updating the userresourcePath
- The absolute path of the resource to apply the ACE to (required)principalId
- The name of the user/group to provision (required)privileges
- Map of privileges to apply. (optional)javax.jcr.RepositoryException
Copyright © 2017 The Apache Software Foundation. All rights reserved.