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 |
bindPostResponseCreator(PostResponseCreator creator,
java.util.Map<java.lang.String,java.lang.Object> properties)
Overridden since the @Reference annotation is not inherited from the super method
|
protected void |
handleOperation(SlingHttpServletRequest request,
PostResponse response,
java.util.List<Modification> changes)
Extending Servlet should implement this operation to do the work
|
void |
modifyAce(javax.jcr.Session jcrSession,
java.lang.String resourcePath,
java.lang.String principalId,
java.util.Map<java.lang.String,java.lang.String> privileges,
java.lang.String order)
Add or modify the access control entry for the specified user
or group.
|
protected void |
unbindPostResponseCreator(PostResponseCreator creator,
java.util.Map<java.lang.String,java.lang.Object> properties)
Unbind a post response creator
|
createHtmlResponse, doPost, externalizePath, getAccessControlList, getItemPath, getRedirectUrl, getRedirectUrl, handleOperation, isSetStatusdoDelete, doPut, getAllowedRequestMethods, isMethodValid, mayServicedoGeneric, doGet, doHead, doOptions, doTrace, getServletInfo, handleMethodNotImplemented, service, serviceprotected void bindPostResponseCreator(PostResponseCreator creator, java.util.Map<java.lang.String,java.lang.Object> properties)
bindPostResponseCreator in class AbstractAccessPostServletorg.apache.sling.jackrabbit.usermanager.impl.post.AbstractPostServlet#bindPostResponseCreator(org.apache.sling.servlets.post.PostResponseCreator, java.util.Map)protected void unbindPostResponseCreator(PostResponseCreator creator, java.util.Map<java.lang.String,java.lang.Object> properties)
AbstractAccessPostServletunbindPostResponseCreator in class AbstractAccessPostServletprotected void handleOperation(SlingHttpServletRequest request, PostResponse response, java.util.List<Modification> changes) throws javax.jcr.RepositoryException
AbstractAccessPostServlethandleOperation in class AbstractAccessPostServletrequest - the sling http request to processresponse - the responsejavax.jcr.RepositoryExceptionpublic void modifyAce(javax.jcr.Session jcrSession,
java.lang.String resourcePath,
java.lang.String principalId,
java.util.Map<java.lang.String,java.lang.String> privileges,
java.lang.String order)
throws javax.jcr.RepositoryException
ModifyAcemodifyAce in interface ModifyAcejcrSession - 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.RepositoryExceptionCopyright © 2018 The Apache Software Foundation. All rights reserved.