Permission checking is done through the method Session.checkPermission:
javax.jcr. |
|
void |
checkPermission(String absPath, Determines whether this Session has permission to perform the specified actions at the specified absPath. This method quietly returns if the access request is permitted, or throws a suitable java.security.AccessControlException otherwise. The actions parameter is a comma separated list of action strings. The following action strings are defined:
add_node
set_property
remove
read When more than one action is specified in the actions parameter, this method will only return quietly if this Session has permission to perform all of the listed actions at the specified path. The information returned through this method will only reflect access control policies and not other restrictions that may exist. For example, even though checkPermission may indicate that a particular Session may add a property at /A/B/C, the node type of the node at /A/B may prevent the addition of a property called C. A RepositoryException is thrown if an error occurs. |