public abstract class RepositoryBackedSecurityManager extends Object
Constructor and Description |
---|
RepositoryBackedSecurityManager() |
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 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! Instead it will simply return without making any change.
|
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
Copyright © 2003–2015 Magnolia International Ltd.. All rights reserved.