AuthorizationService
class AuthorizationService (View source)
This service provides API methods to check for privileges on nodes and permissions for node actions.
Properties
protected Context | $securityContext | ||
protected PrivilegeManagerInterface | $privilegeManager | ||
protected NodeTypeManager | $nodeTypeManager |
Methods
Returns true if the currently authenticated user is allowed to edit the given $node, otherwise false
Returns true if the currently authenticated user is allowed to create a node of type $typeOfNewNode within the given $referenceNode
Returns the node types that the currently authenticated user is denied to create within the given $referenceNode
Returns true if the currently authenticated user is allowed to remove the given $node
Details
bool
isGrantedToEditNode(NodeInterface $node)
Returns true if the currently authenticated user is allowed to edit the given $node, otherwise false
bool
isGrantedToCreateNode(NodeInterface $referenceNode, NodeType $typeOfNewNode = null)
Returns true if the currently authenticated user is allowed to create a node of type $typeOfNewNode within the given $referenceNode
string[]
getNodeTypeNamesDeniedForCreation(NodeInterface $referenceNode)
Returns the node types that the currently authenticated user is denied to create within the given $referenceNode
bool
isGrantedToRemoveNode(NodeInterface $node)
Returns true if the currently authenticated user is allowed to remove the given $node
bool
isGrantedToReadNodeProperty(NodeInterface $node, string $propertyName)
No description
bool
isGrantedToEditNodeProperty(NodeInterface $node, string $propertyName)
No description
string[]
getDeniedNodePropertiesForEditing(NodeInterface $node)
No description