Skip to content

Commit 658a0e2

Browse files
committed
BUGFIX: Use new workspace ui privilege names in userservice
1 parent 6d30803 commit 658a0e2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Neos.Neos/Classes/Domain/Service/UserService.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -733,21 +733,21 @@ public function currentUserCanManageWorkspace(Workspace $workspace): bool
733733

734734
if ($workspace->isInternalWorkspace()) {
735735
return $this->privilegeManager->isPrivilegeTargetGranted(
736-
'Neos.Neos:Backend.Module.Management.Workspaces.ManageInternalWorkspaces'
736+
'Neos.Workspace.Ui:Backend.Module.Management.Workspace.ManageInternalWorkspaces'
737737
);
738738
}
739739

740-
741740
$currentUser = $this->getCurrentUser();
741+
742742
if ($workspace->isPrivateWorkspace() && $currentUser !== null && $workspace->workspaceOwner === $this->persistenceManager->getIdentifierByObject($currentUser)) {
743743
return $this->privilegeManager->isPrivilegeTargetGranted(
744-
'Neos.Neos:Backend.Module.Management.Workspaces.ManageOwnWorkspaces'
744+
'Neos.Workspace.Ui:Backend.Module.Management.Workspace.ManageOwnWorkspaces'
745745
);
746746
}
747747

748748
if ($workspace->isPrivateWorkspace() && $currentUser !== null && $workspace->workspaceOwner !== $this->persistenceManager->getIdentifierByObject($currentUser)) {
749749
return $this->privilegeManager->isPrivilegeTargetGranted(
750-
'Neos.Neos:Backend.Module.Management.Workspaces.ManageAllPrivateWorkspaces'
750+
'Neos.Workspace.Ui:Backend.Module.Management.Workspace.ManageAllPrivateWorkspaces'
751751
);
752752
}
753753

@@ -771,7 +771,7 @@ public function currentUserCanTransferOwnershipOfWorkspace(Workspace $workspace)
771771
// of their internal workspaces, even if it was technically possible, because they wouldn't be able to change
772772
// ownership back to themselves.
773773
return $this->privilegeManager->isPrivilegeTargetGranted(
774-
'Neos.Neos:Backend.Module.Management.Workspaces.ManageInternalWorkspaces'
774+
'Neos.Workspace.Ui:Backend.Module.Management.Workspace.ManageInternalWorkspaces'
775775
);
776776
}
777777

0 commit comments

Comments
 (0)