Class GetEffectiveAceServlet
java.lang.Object
javax.servlet.GenericServlet
org.apache.sling.api.servlets.SlingSafeMethodsServlet
org.apache.sling.api.servlets.SlingAllMethodsServlet
org.apache.sling.jcr.jackrabbit.accessmanager.post.AbstractAccessServlet
org.apache.sling.jcr.jackrabbit.accessmanager.post.AbstractAccessGetServlet
org.apache.sling.jcr.jackrabbit.accessmanager.post.AbstractGetAceServlet
org.apache.sling.jcr.jackrabbit.accessmanager.post.GetEffectiveAceServlet
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
,GetEffectiveAce
Sling Get Servlet implementation for getting the effective ACE for a principal on a JCR resource.
Rest Service Description
Get a principal's ACE for the node identified as a resource by the request URL >resource<.eace.json?pid=[principal_id]
Transport Details:
Methods
- GET
Get Parameters
- pid
- The principal id of the ACE to get in the effective ACL specified by the path.
Response
- 200
- Success.
- 404
- The resource was not found or no access control entries exist for the principal.
- 500
- Failure. JSON explains the failure.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addExtraInfo
(jakarta.json.JsonObjectBuilder principalJson, Principal principal, Map<Principal, Map<DeclarationType, Set<String>>> principalToDeclaredAtPaths) Overridden to add the declaredAt data to the jsongetAccessControlEntriesMap
(javax.jcr.Session session, String absPath, Principal principal, Map<Principal, Map<DeclarationType, Set<String>>> declaredAtPaths) jakarta.json.JsonObject
getEffectiveAce
(javax.jcr.Session jcrSession, String resourcePath, String principalId) Gets the effective access control entry for a resource and principalMethods inherited from class org.apache.sling.jcr.jackrabbit.accessmanager.post.AbstractGetAceServlet
getAccessControlEntries, internalGetAce, internalJson
Methods inherited from class org.apache.sling.jcr.jackrabbit.accessmanager.post.AbstractAccessGetServlet
doGet, entriesSortedByEffectivePath, getItemPath, processACE, validateArgs, validateArgs, validateResourcePath
Methods inherited from class org.apache.sling.jcr.jackrabbit.accessmanager.post.AbstractAccessServlet
bindRestrictionProvider, getRestrictionProvider, unbindRestrictionProvider
Methods inherited from class org.apache.sling.api.servlets.SlingAllMethodsServlet
doDelete, doPost, doPut, getAllowedRequestMethods, isMethodValid, mayService
Methods inherited from class org.apache.sling.api.servlets.SlingSafeMethodsServlet
doGeneric, doHead, doOptions, doTrace, getServletInfo, handleMethodNotImplemented, service, service
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, init, log, log
-
Constructor Details
-
GetEffectiveAceServlet
public GetEffectiveAceServlet()
-
-
Method Details
-
getEffectiveAce
public jakarta.json.JsonObject getEffectiveAce(javax.jcr.Session jcrSession, String resourcePath, String principalId) throws javax.jcr.RepositoryException Description copied from interface:GetEffectiveAce
Gets the effective access control entry for a resource and principal- Specified by:
getEffectiveAce
in interfaceGetEffectiveAce
- Parameters:
jcrSession
- the JCR session of the user updating the userresourcePath
- The path of the resource to get the ACE for (required)principalId
- the principal to get the ACE for (required)- Returns:
- the ACE as a JSON object
- Throws:
javax.jcr.RepositoryException
- if any errors reading the information
-
addExtraInfo
protected void addExtraInfo(jakarta.json.JsonObjectBuilder principalJson, Principal principal, Map<Principal, Map<DeclarationType, Set<String>>> principalToDeclaredAtPaths) Overridden to add the declaredAt data to the json- Overrides:
addExtraInfo
in classAbstractGetAceServlet
- Parameters:
principalJson
- the current principal JSON builderprincipal
- the current principalprincipalToDeclaredAtPaths
- a map of principal the paths where ACEs are declared
-
getAccessControlEntriesMap
protected Map<String,List<javax.jcr.security.AccessControlEntry>> getAccessControlEntriesMap(javax.jcr.Session session, String absPath, Principal principal, Map<Principal, Map<DeclarationType, throws javax.jcr.RepositoryExceptionSet<String>>> declaredAtPaths) - Specified by:
getAccessControlEntriesMap
in classAbstractGetAceServlet
- Throws:
javax.jcr.RepositoryException
-