Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TASK: Properly re-remove obsolete legacy userInformation.personalWorkspaceName in policy for workspaces #5418

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Neos.Neos/Classes/Service/UserService.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,18 @@ public function getBackendUser()
return $this->userDomainService->getCurrentUser();
}

/**
* 8.3 behaviour: Returns the name of the currently logged in user's personal workspace
* (even if that might not exist at that time).
* If no user is logged in this method returns null.
*
* @deprecated and not implemented with Neos 9.0 - can be removed any time, just for the 8.3 upgrade phase
*/
public function getPersonalWorkspaceName(): ?string
{
throw new \LogicException('`userInformation.personalWorkspaceName` was removed in Neos 9.0 see https://github.com/neos/neos-development-collection/pull/5418');
}

/**
* Returns the stored preferences of a user
*
Expand Down
8 changes: 0 additions & 8 deletions Neos.Neos/Configuration/Policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ privilegeTargets:
label: Access to content service APIs
matcher: 'method(Neos\Neos\Controller\Backend\SchemaController->(nodeTypeSchema)Action()) || method(Neos\Neos\Controller\Backend\SettingsController->editPreviewAction())'

'Neos.Neos:Backend.PersonalWorkspaceReadAccess.NodeConverter':
label: Access to own personal workspace
matcher: 'method(Neos\Neos\TypeConverter\NodeConverter->prepareContextProperties(workspaceName === current.userInformation.personalWorkspaceName))'

'Neos.Neos:Backend.EditContent':
label: General access to content editing
matcher: 'method(Neos\Neos\Service\Controller\NodeController->(show|getPrimaryChildNode|getChildNodesForTree|filterChildNodesForTree|getChildNodes|getChildNodesFromParent|create|createAndRender|createNodeForTheTree|move|moveBefore|moveAfter|moveInto|moveAndRender|copy|copyBefore|copyAfter|copyInto|copyAndRender|update|updateAndRender|delete|searchPage|error)Action()) || method(Neos\Neos\Controller\Backend\ContentController->(uploadAsset|assetsWithMetadata|imageWithMetadata|createImageVariant|error)Action()) || method(Neos\Neos\Controller\Service\AssetProxiesController->(index|show|import|error)Action()) || method(Neos\Neos\Controller\Service\AssetsController->(index|show|error)Action()) || method(Neos\Neos\Controller\Service\NodesController->(index|show|create|error)Action())'
Expand Down Expand Up @@ -169,10 +165,6 @@ roles:
privilegeTarget: 'Neos.Neos:ContentPreview'
permission: GRANT

-
privilegeTarget: 'Neos.Neos:Backend.PersonalWorkspaceReadAccess.NodeConverter'
permission: GRANT

-
privilegeTarget: 'Neos.Neos:Backend.EditContent'
permission: GRANT
Expand Down
Loading