public abstract class RepositoryBackedSecurityManager extends Object
Modifier and Type | Field and Description |
---|---|
protected NodeNameHelper |
nodeNameHelper |
Constructor and Description |
---|
RepositoryBackedSecurityManager()
Deprecated.
since 5.5.3, use
RepositoryBackedSecurityManager(NodeNameHelper) instead. |
RepositoryBackedSecurityManager(NodeNameHelper nodeNameHelper) |
Modifier and Type | Method and Description |
---|---|
protected void |
add(String principalName,
String resourceName,
String resourceTypeName)
Adds link to a resource (group or role) to the principal (user or group).
|
protected abstract javax.jcr.Node |
findPrincipalNode(String principalName,
javax.jcr.Session session) |
protected javax.jcr.Node |
findPrincipalNode(String principalName,
javax.jcr.Session session,
String primaryNodeType) |
protected javax.jcr.Node |
findPrincipalNode(String principalName,
javax.jcr.Session session,
String primaryNodeType,
javax.jcr.Node startNode)
Find principal nodes of type
NodeTypes.User#NAME , NodeTypes.Group#NAME or NodeTypes.Role#NAME . |
protected javax.jcr.NodeIterator |
findPrincipalNodes(javax.jcr.Node node,
String nodeType)
Find nodes located in the provided node or in sub-folders within it that have the provided nodeType.
|
protected Collection<String> |
findUsersOrGroupsHavingAssignedGroupOrRoleWithUid(javax.jcr.Session session,
javax.jcr.Node groupOrRoleNode,
String parentNodeName) |
protected Map<String,ACL> |
getACLs(javax.jcr.Node node) |
Map<String,ACL> |
getACLs(String principalName) |
protected abstract String |
getRepositoryName() |
protected String |
getResourceName(String resourceId) |
boolean |
hasAny(String principalName,
String resourceName,
String resourceTypeName) |
protected void |
remove(String principalName,
String resourceName,
String resourceTypeName)
This call is lenient and will not throw exception in case principal doesn't exist!
|
protected final NodeNameHelper nodeNameHelper
@Inject public RepositoryBackedSecurityManager(NodeNameHelper nodeNameHelper)
@Deprecated public RepositoryBackedSecurityManager()
RepositoryBackedSecurityManager(NodeNameHelper)
instead.protected void add(String principalName, String resourceName, String resourceTypeName) throws PrincipalNotFoundException
principalName
- name of the user or group to be updatedresourceName
- name of the group or role to be addedresourceTypeName
- type of the added resource (group or role) SecurityConstants.NODE_ROLES
, SecurityConstants.NODE_GROUPS
PrincipalNotFoundException
protected void remove(String principalName, String resourceName, String resourceTypeName) throws PrincipalNotFoundException
principalName
- name of the user or group to be updatedresourceName
- name of the group or role to be addedresourceTypeName
- type of the added resource (group or role) SecurityConstants.NODE_ROLES
, SecurityConstants.NODE_GROUPS
PrincipalNotFoundException
protected abstract String getRepositoryName()
protected abstract javax.jcr.Node findPrincipalNode(String principalName, javax.jcr.Session session) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected javax.jcr.Node findPrincipalNode(String principalName, javax.jcr.Session session, String primaryNodeType) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected javax.jcr.Node findPrincipalNode(String principalName, javax.jcr.Session session, String primaryNodeType, javax.jcr.Node startNode) throws javax.jcr.RepositoryException
NodeTypes.User#NAME
, NodeTypes.Group#NAME
or NodeTypes.Role#NAME
.
As we don't save sessions during installation phase the principals that are searched might not be visible to JRC queries so we use traversal then.javax.jcr.RepositoryException
protected Map<String,ACL> getACLs(javax.jcr.Node node) throws javax.jcr.RepositoryException, javax.jcr.ValueFormatException, javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
javax.jcr.ValueFormatException
javax.jcr.PathNotFoundException
protected javax.jcr.NodeIterator findPrincipalNodes(javax.jcr.Node node, String nodeType) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected Collection<String> findUsersOrGroupsHavingAssignedGroupOrRoleWithUid(javax.jcr.Session session, javax.jcr.Node groupOrRoleNode, String parentNodeName) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
Copyright © 2003–2018 Magnolia International Ltd.. All rights reserved.