public class GetAclServlet extends AbstractGetAclServlet implements GetAcl
Sling GET servlet implementation for dumping the declared ACL of a resource to JSON.
Mapped to the default resourceType. Gets and Acl for a resource. Get of the form >resource<.acl.json Provided the user has access to the ACL, they get a chunk of JSON of the form.
{
"principalNameA":
{ "granted" : [
"permission1",
"permission2",
"permission3",
"permission4" ],
"denied" : [
"permission5",
"permission6",
"permission7",
"permission8"]
},
"principalNameB":
{ "granted" : [
"permission1",
"permission2",
"permission3",
"permission4" ],
"denied" : [
"permission5",
"permission6",
"permission7",
"permission8"] },
"principalNameC":
{ "granted" : [
"permission1",
"permission2",
"permission3",
"permission4" ],
"denied" : [
"permission5",
"permission6",
"permission7",
"permission8"] }
}
Constructor and Description |
---|
GetAclServlet() |
Modifier and Type | Method and Description |
---|---|
protected javax.jcr.security.AccessControlEntry[] |
getAccessControlEntries(javax.jcr.Session session,
java.lang.String absPath) |
javax.json.JsonObject |
getAcl(javax.jcr.Session jcrSession,
java.lang.String resourcePath)
Gets the access control list for a resource.
|
doGet, internalGetAcl
doDelete, doPost, doPut, getAllowedRequestMethods, isMethodValid, mayService
doGeneric, doHead, doOptions, doTrace, getServletInfo, handleMethodNotImplemented, service, service
public javax.json.JsonObject getAcl(javax.jcr.Session jcrSession, java.lang.String resourcePath) throws javax.jcr.RepositoryException
GetAcl
protected javax.jcr.security.AccessControlEntry[] getAccessControlEntries(javax.jcr.Session session, java.lang.String absPath) throws javax.jcr.RepositoryException
getAccessControlEntries
in class AbstractGetAclServlet
javax.jcr.RepositoryException
Copyright © 2018 The Apache Software Foundation. All rights reserved.