public class CqActions
extends java.lang.Object
"read" Privilege.JCR_READ "modify" Privilege.JCR_MODIFY_PROPERTIES, Privilege.JCR_LOCK_MANAGEMENT, Privilege.JCR_VERSION_MANAGEMENT "create" Privilege.JCR_ADD_CHILD_NODES, Privilege.JCR_NODE_TYPE_MANAGEMENT "delete" Privilege.JCR_REMOVE_CHILD_NODES, Privilege.JCR_REMOVE_NODE "acl_read" Privilege.JCR_READ_ACCESS_CONTROL "acl_write" Privilege.JCR_MODIFY_ACCESS_CONTROL "replicate" "crx:replicate" (custom privilege)
Modifier and Type | Field and Description |
---|---|
static java.lang.String[] |
ACTIONS
Deprecated.
CQ actions constants
|
Modifier and Type | Method and Description |
---|---|
static boolean |
definesContent(Node node)
Deprecated.
Returns
true if the node is defined to have a jcr:content
child node (that may or may not be present yet). |
java.util.Collection<java.lang.String> |
getActions(Session session,
java.lang.String path)
Deprecated.
Since 5.4
|
java.util.Collection<java.lang.String> |
getAllowedActions(java.lang.String nodePath,
java.util.Set<java.security.Principal> principals)
Deprecated.
|
java.util.Set<Privilege> |
getPrivileges(java.lang.String action)
Deprecated.
As of CQ 5.4 the mapping of CQ action to resulting ACEs/privileges
depends on the nature of the target node.
|
static boolean |
hasContentRestriction(AccessControlEntry ace)
Deprecated.
|
void |
installActions(java.lang.String nodePath,
java.security.Principal principal,
java.util.Map<java.lang.String,java.lang.Boolean> actionMap,
java.util.Collection<java.lang.String> inheritedAllows)
Deprecated.
Installs the specified actions for the given principal at the specified
targetNode by converting it the corresponding JCR access control content.
|
boolean |
isGranted(java.util.Set<Privilege> privs,
java.lang.String action)
Deprecated.
As of CQ 5.4 the mapping of CQ action to privileges depends on
the nature of the target node.
|
public static final java.lang.String[] ACTIONS
public CqActions(Session session) throws RepositoryException
RepositoryException
public java.util.Set<Privilege> getPrivileges(java.lang.String action)
action
string.action
- The action to be mapped.public boolean isGranted(java.util.Set<Privilege> privs, java.lang.String action)
action
is granted by the given set of
privileges.action
- the action to testedprivs
- the privileges (on the node)true
if the action is allowed.public java.util.Collection<java.lang.String> getActions(Session session, java.lang.String path) throws RepositoryException
path
- the path to checksession
- the sessionRepositoryException
- if an error occurspublic java.util.Collection<java.lang.String> getAllowedActions(java.lang.String nodePath, java.util.Set<java.security.Principal> principals) throws RepositoryException
nodePath
- principals
- The set of principals for which the action set needs
to be evaluated. In case of a null
value, this method will use the sessions's principals for evaluationRepositoryException
- If an error occurs.public void installActions(java.lang.String nodePath, java.security.Principal principal, java.util.Map<java.lang.String,java.lang.Boolean> actionMap, java.util.Collection<java.lang.String> inheritedAllows) throws RepositoryException
nodePath
- actionMap
- A map of CQ Action name to a Boolean indicating whether
the action should be granted or denied.inheritedAllows
- RepositoryException
- If an error occurs.public static boolean definesContent(Node node) throws RepositoryException
true
if the node is defined to have a jcr:content
child node (that may or may not be present yet). Note that the test
by intention does not rely on the existence of a jcr:content node
that may as well be present with an unstructured or folder node.node
- RepositoryException
public static boolean hasContentRestriction(AccessControlEntry ace) throws RepositoryException
ace
- RepositoryException
Copyright © 2010 - 2020 Adobe. All Rights Reserved