final class ContentRepositoryAuthorizationService (View source)

Central point which does ContentRepository authorization decisions within Neos.

Constants

private ROLE_NEOS_ADMINISTRATOR

Methods

__construct(WorkspaceMetadataAndRoleRepository $metadataAndRoleRepository, PolicyService $policyService, PrivilegeManagerInterface $privilegeManager)

No description

getWorkspacePermissions(ContentRepositoryId $contentRepositoryId, WorkspaceName $workspaceName, array $roles, UserId|null $userId)

Determines the {WorkspacePermissions} a user with the specified {Role}s has for the specified workspace

getNodePermissions(Node $node, array $roles)

Determines the {NodePermissions} a user with the specified {Role}s has on the given {Node}

getVisibilityConstraints(ContentRepositoryId $contentRepositoryId, array $roles)

Determines the default {VisibilityConstraints} for the specified {Role}s

Details

__construct(WorkspaceMetadataAndRoleRepository $metadataAndRoleRepository, PolicyService $policyService, PrivilegeManagerInterface $privilegeManager)

No description

Parameters

WorkspaceMetadataAndRoleRepository $metadataAndRoleRepository
PolicyService $policyService
PrivilegeManagerInterface $privilegeManager

WorkspacePermissions getWorkspacePermissions(ContentRepositoryId $contentRepositoryId, WorkspaceName $workspaceName, array $roles, UserId|null $userId)

Determines the {WorkspacePermissions} a user with the specified {Role}s has for the specified workspace

Parameters

ContentRepositoryId $contentRepositoryId
WorkspaceName $workspaceName
array $roles

The {\Neos\Flow\Security\Policy\Role} instances to check access for. Note: These have to be the expanded roles auf the authenticated tokens {\Neos\Flow\Security\Context::getRoles()}

UserId|null $userId

Optional ID of the authenticated Neos user. If set the workspace owner is evaluated since owners always have all permissions on their workspace

Return Value

WorkspacePermissions

NodePermissions getNodePermissions(Node $node, array $roles)

Determines the {NodePermissions} a user with the specified {Role}s has on the given {Node}

Parameters

Node $node
array $roles

Return Value

NodePermissions

VisibilityConstraints getVisibilityConstraints(ContentRepositoryId $contentRepositoryId, array $roles)

Determines the default {VisibilityConstraints} for the specified {Role}s

Parameters

ContentRepositoryId $contentRepositoryId
array $roles

Return Value

VisibilityConstraints