Package com.day.cq.security.util
Class CqActions
java.lang.Object
com.day.cq.security.util.CqActions
Deprecated.
Please use Apache Jackrabbit privilege management and JCR access control management API instead.
This class defines the main CQ Actions and provides the mapping from and to
JCR Privileges.
"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)
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleandefinesContent(Node node) Deprecated.Returnstrueif the node is defined to have a jcr:content child node (that may or may not be present yet).getActions(Session session, String path) Deprecated.Since 5.4getAllowedActions(String nodePath, Set<Principal> principals) Deprecated.getPrivileges(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 booleanDeprecated.voidinstallActions(String nodePath, Principal principal, Map<String, Boolean> actionMap, Collection<String> inheritedAllows) Deprecated.Installs the specified actions for the given principal at the specified targetNode by converting it the corresponding JCR access control content.booleanDeprecated.As of CQ 5.4 the mapping of CQ action to privileges depends on the nature of the target node.
-
Field Details
-
ACTIONS
Deprecated.CQ actions constants
-
-
Constructor Details
-
CqActions
Deprecated.- Throws:
RepositoryException
-
-
Method Details
-
getPrivileges
Deprecated.As of CQ 5.4 the mapping of CQ action to resulting ACEs/privileges depends on the nature of the target node.Returns the privileges that correspond to the givenactionstring.- Parameters:
action- The action to be mapped.- Returns:
- A set of privileges.
-
isGranted
Deprecated.As of CQ 5.4 the mapping of CQ action to privileges depends on the nature of the target node.Tests if the givenactionis granted by the given set of privileges.- Parameters:
privs- the privileges (on the node)action- the action to tested- Returns:
trueif the action is allowed.
-
getActions
Deprecated.Since 5.4Returns the names of the actions that are granted on the given path.- Parameters:
session- the sessionpath- the path to check- Returns:
- the set of actions that are granted.
- Throws:
RepositoryException- if an error occurs
-
getAllowedActions
public Collection<String> getAllowedActions(String nodePath, Set<Principal> principals) throws RepositoryException Deprecated.- Parameters:
nodePath-principals- The set of principals for which the action set needs to be evaluated. In case of anullvalue, this method will use the sessions's principals for evaluation- Returns:
- the set of actions granted for the specified principals at the specified path.
- Throws:
RepositoryException- If an error occurs.- Since:
- 5.4
-
installActions
public void installActions(String nodePath, Principal principal, Map<String, Boolean> actionMap, Collection<String> inheritedAllows) throws RepositoryExceptionDeprecated.Installs the specified actions for the given principal at the specified targetNode by converting it the corresponding JCR access control content.- Parameters:
nodePath-actionMap- A map of CQ Action name to a Boolean indicating whether the action should be granted or denied.inheritedAllows-- Throws:
RepositoryException- If an error occurs.
-
definesContent
Deprecated.Returnstrueif 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.- Parameters:
node-- Returns:
- true if the specified node is defined to possibly have a jcr:content child (such as e.g. nt:file, cq:Page and similar).
- Throws:
RepositoryException
-
hasContentRestriction
Deprecated.- Parameters:
ace-- Returns:
- Throws:
RepositoryException
-