public class GetEffectiveAclServlet extends AbstractGetAclServlet implements GetEffectiveAcl
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"] }
}
KEY_DENIED, KEY_GRANTED, KEY_ORDER
Constructor and Description |
---|
GetEffectiveAclServlet() |
Modifier and Type | Method and Description |
---|---|
protected javax.jcr.security.AccessControlEntry[] |
getAccessControlEntries(javax.jcr.Session session,
java.lang.String absPath) |
javax.json.JsonObject |
getEffectiveAcl(javax.jcr.Session jcrSession,
java.lang.String resourcePath)
Gets the effective 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 getEffectiveAcl(javax.jcr.Session jcrSession, java.lang.String resourcePath) throws javax.jcr.RepositoryException
GetEffectiveAcl
getEffectiveAcl
in interface GetEffectiveAcl
jcrSession
- the JCR session of the user updating the userresourcePath
- The path of the resource to get the ACL for (required)javax.jcr.RepositoryException
- if any errors reading the informationprotected 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 © 2022 The Apache Software Foundation. All rights reserved.