diff --git a/Neos.ContentRepositoryRegistry/Classes/Service/EventMigrationService.php b/Neos.ContentRepositoryRegistry/Classes/Service/EventMigrationService.php index 80d849bb17..3348f1b73b 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Service/EventMigrationService.php +++ b/Neos.ContentRepositoryRegistry/Classes/Service/EventMigrationService.php @@ -716,7 +716,7 @@ public function migrateWorkspaceMetadataToWorkspaceService(\Closure $outputFn): ]; $roleAssignments[] = [ 'subject_type' => WorkspaceRoleSubjectType::GROUP->value, - 'subject' => 'Neos.Neos:Everybody', + 'subject' => 'Neos.Flow:Everybody', 'role' => WorkspaceRole::VIEWER->value, ]; } elseif ($isInternalWorkspace) { diff --git a/Neos.Neos/Classes/Domain/Import/LiveWorkspaceCreationProcessor.php b/Neos.Neos/Classes/Domain/Import/LiveWorkspaceCreationProcessor.php index 788dad9373..58ba49be52 100644 --- a/Neos.Neos/Classes/Domain/Import/LiveWorkspaceCreationProcessor.php +++ b/Neos.Neos/Classes/Domain/Import/LiveWorkspaceCreationProcessor.php @@ -19,10 +19,6 @@ use Neos\ContentRepository\Export\ProcessingContext; use Neos\ContentRepository\Export\ProcessorInterface; use Neos\ContentRepository\Export\Severity; -use Neos\Neos\Domain\Model\WorkspaceDescription; -use Neos\Neos\Domain\Model\WorkspaceRole; -use Neos\Neos\Domain\Model\WorkspaceRoleAssignment; -use Neos\Neos\Domain\Model\WorkspaceTitle; use Neos\Neos\Domain\Service\WorkspaceService; /** @@ -44,7 +40,6 @@ public function run(ProcessingContext $context): void $context->dispatch(Severity::NOTICE, 'Workspace already exists, skipping'); return; } - $this->workspaceService->createRootWorkspace($this->contentRepository->id, WorkspaceName::forLive(), WorkspaceTitle::fromString('Live workspace'), WorkspaceDescription::fromString('')); - $this->workspaceService->assignWorkspaceRole($this->contentRepository->id, WorkspaceName::forLive(), WorkspaceRoleAssignment::createForGroup('Neos.Neos:LivePublisher', WorkspaceRole::COLLABORATOR)); + $this->workspaceService->createLiveWorkspaceIfMissing($this->contentRepository->id); } } diff --git a/Neos.Neos/Classes/Domain/Service/WorkspaceService.php b/Neos.Neos/Classes/Domain/Service/WorkspaceService.php index fae30ec7d6..96a5a5edb4 100644 --- a/Neos.Neos/Classes/Domain/Service/WorkspaceService.php +++ b/Neos.Neos/Classes/Domain/Service/WorkspaceService.php @@ -140,6 +140,7 @@ public function createLiveWorkspaceIfMissing(ContentRepositoryId $contentReposit } $this->createRootWorkspace($contentRepositoryId, $workspaceName, WorkspaceTitle::fromString('Public live workspace'), WorkspaceDescription::empty()); $this->metadataAndRoleRepository->assignWorkspaceRole($contentRepositoryId, $workspaceName, WorkspaceRoleAssignment::createForGroup('Neos.Neos:LivePublisher', WorkspaceRole::COLLABORATOR)); + $this->metadataAndRoleRepository->assignWorkspaceRole($contentRepositoryId, $workspaceName, WorkspaceRoleAssignment::createForGroup('Neos.Flow:Everybody', WorkspaceRole::VIEWER)); } /** diff --git a/Neos.Neos/Tests/Behavior/Features/ContentRepository/Security/EditNodePrivilege.feature b/Neos.Neos/Tests/Behavior/Features/ContentRepository/Security/EditNodePrivilege.feature index d279d03528..2355a2f72f 100644 --- a/Neos.Neos/Tests/Behavior/Features/ContentRepository/Security/EditNodePrivilege.feature +++ b/Neos.Neos/Tests/Behavior/Features/ContentRepository/Security/EditNodePrivilege.feature @@ -29,10 +29,7 @@ Feature: EditNodePrivilege related features """ And using identifier "default", I define a content repository And I am in content repository "default" - And the command CreateRootWorkspace is executed with payload: - | Key | Value | - | workspaceName | "live" | - | newContentStreamId | "cs-identifier" | + And the live workspace exists And I am in workspace "live" and dimension space point {} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | diff --git a/Neos.Neos/Tests/Behavior/Features/ContentRepository/Security/ReadNodePrivilege.feature b/Neos.Neos/Tests/Behavior/Features/ContentRepository/Security/ReadNodePrivilege.feature index 2545f9c7ba..02cfd9b7e8 100644 --- a/Neos.Neos/Tests/Behavior/Features/ContentRepository/Security/ReadNodePrivilege.feature +++ b/Neos.Neos/Tests/Behavior/Features/ContentRepository/Security/ReadNodePrivilege.feature @@ -29,10 +29,7 @@ Feature: ReadNodePrivilege related features """ And using identifier "default", I define a content repository And I am in content repository "default" - And the command CreateRootWorkspace is executed with payload: - | Key | Value | - | workspaceName | "live" | - | newContentStreamId | "cs-identifier" | + And the live workspace exists And I am in workspace "live" and dimension space point {} And the command CreateRootNodeAggregateWithNode is executed with payload: | Key | Value | @@ -64,7 +61,6 @@ Feature: ReadNodePrivilege related features | nodeAggregateId | "a" | | nodeVariantSelectionStrategy | "allSpecializations" | | tag | "subtree_a" | - And the role VIEWER is assigned to workspace "live" for group "Neos.Flow:Everybody" When a personal workspace for user "editor" is created And content repository security is enabled