-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
!!! FEATURE: Extract workspace metadata and user-assignment to Neos #5146
!!! FEATURE: Extract workspace metadata and user-assignment to Neos #5146
Conversation
Introduces `WorkspacePublishingService` as replacement for the current Neos `Workspace` "active record" model. Introduces `WorkspaceService` as central authority to manage Neos workspaces. Related: #4726
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some early thoughts thanks for the progress so far ❤️
Notes from my side:
- remove
\Neos\Neos\Domain\Service\UserService::deletePersonalWorkspace
and\Neos\Neos\Domain\Service\UserService::removeOwnerFromUsersWorkspaces
- deprecate
\Neos\Neos\Service\UserService::getPersonalWorkspaceName
- remove
WorkspaceNameBuilder
again
Neos.ContentRepositoryRegistry/Classes/ContentRepositoryRegistry.php
Outdated
Show resolved
Hide resolved
Neos.ContentRepository.Core/Classes/SharedModel/Workspace/WorkspaceName.php
Outdated
Show resolved
Hide resolved
Neos.ContentRepository.Core/Classes/SharedModel/Workspace/WorkspaceName.php
Outdated
Show resolved
Hide resolved
Neos.ContentRepositoryRegistry/Classes/ContentRepositoryRegistry.php
Outdated
Show resolved
Hide resolved
…ser-assignment-to-neos
…ser-assignment-to-neos
…ser-assignment-to-neos
Extracted from #5146 this just improves stability of the `WorkspaceName` value object by - Restricting the allowed value range to 30 lower case characters and properly enforce it - Adding a `tryFromString()` constructor - Exposing the `MAX_LENGTH` and use that for the corresponding database schemas - 100% test coverage Related: #4726
…ser-assignment-to-neos
…ser-assignment-to-neos
…ser-assignment-to-neos
and add initial behat tests
…orkspace-metadata-and-user-assignment-to-neos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks really good and perfectly thought out now thanks!
I also was able to remove the migration hack from the Neos ui e2e tests and use the assignRole command now.
The UI e2e tests mostly (except the flaky ones) pass and i just triggered one final run in the CI.
The Neos CI here is a bit kaput due to the Neos UI accidentally also being installed when testing and that crashes it due to a missing class and flow DI. See #4951
Locally phpstan and the CR behat tests pass which is IMO a good enough indicator. Post merge well see if were right *g
...and fix the discovered bugs along the way o.O
…ment-to-neos' of https://github.com/neos/neos-development-collection into feature/4726-extract-workspace-metadata-and-user-assignment-to-neos
…ment-to-neos' of https://github.com/neos/neos-development-collection into feature/4726-extract-workspace-metadata-and-user-assignment-to-neos
* Draft: FEATURE: Extract workspace metadata and user-assignment to Neos Counter-part to neos/neos-development-collection#5146 * wip * WIP REVERT ME, PATCH E2E * Remove Neos UI `WorkspaceService` * Re-add UI WorkspaceService for now * Remove `WorkspaceNameBuilder` usages * TASK: Reintroduce usage of neos ui command value objects * Remove obsolete namespace import * WIP: Try to adjust e2e to work with new Neos workspace metadata * TASK: Remove `migrateWorkspaceMetadataToWorkspaceService` hack from e2e tests and use `assignrole` * Revert "WIP REVERT ME, PATCH E2E" This reverts commit 3aefeb2. --------- Co-authored-by: mhsdesign <[email protected]>
Based on neos/neos-development-collection#5146 Required to ease migration to neos/neos-development-collection#5096
…e creation With #5146 a basic workspace access control was implemented. With that, users won't have access to workspaces unless they have a role assigned. This can be achieved via ```shell ./flow workspace:assignrole ``` This bugfix makes sure, that the default behavior (users with the role `Neos.Neos:LivePublisher` can collaborate on the `live` workspace) is automatically ensured when creating/importing a site. Furthermore, the migration command has been fixed to add metadata & role assignments even if no workspace title was set: ```shell ./flow migrateevents:migrateWorkspaceMetadataToWorkspaceService ``` Related: #4726
With the introduction of explicit user assignments for workspaces neos#5146 and roles and the full evaluation of those via neos#5298 we have replaced the previously still kept 8.3 yaml security configuration for workspaces. This decision was done as for security we can no longer use flows security framework which uses aop inside the content-repository library, and also we wanted to cleanup the user <-> workspace relation ship as well as the concept of internal vs shared workspaces. Following yaml roles were removed: - `Neos.ContentRepository:Administrator` - `Neos.ContentRepository:InternalWorkspaceAccess` Following yaml targets were removed: - `Neos.Neos:PublicWorkspaceAccess` - `Neos.Neos:OtherWorkspacesAccess` - `Neos.Neos:Backend.OtherUsersPersonalWorkspaceAccess` - `Neos.Neos:Backend.PublishOwnWorkspaceContent` - `Neos.Neos:Backend.DiscardOwnWorkspaceContent` - `Neos.Workspace.Ui:Backend.PublishAllToLiveWorkspace` Note that these targets were moved to the `Neos.Workspace.Ui:Backend` package via neos#5118 in 9.0 but were removed now either way: - `Neos.Neos:Backend.Module.Management.Workspaces.ManageOwnWorkspaces` (`Neos.Workspace.Ui:Backend.Module.Management.Workspace.ManageOwnWorkspaces`) - `Neos.Neos:Backend.Module.Management.Workspaces.ManageInternalWorkspaces` (`Neos.Workspace.Ui:Backend.Module.Management.Workspace.ManageInternalWorkspaces`) - `Neos.Neos:Backend.Module.Management.Workspaces.ManageAllPrivateWorkspaces` (`Neos.Workspace.Ui:Backend.Module.Management.Workspace.ManageAllPrivateWorkspaces`)
Introduces
WorkspacePublishingService
as replacement for the current NeosWorkspace
"active record" model.Introduces
WorkspaceService
as central authority to manage Neos workspaces.Migration
To migrate existing workspace metadata & roles, run
(The doctrine migrations definitely have to be executed before the first login!)
Related: #4726
Related: #4186 (introduced workspace renaming etc)