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

!!! FEATURE: Extract workspace metadata and user-assignment to Neos #5146

Conversation

bwaidelich
Copy link
Member

@bwaidelich bwaidelich commented Jun 17, 2024

Introduces WorkspacePublishingService as replacement for the current Neos Workspace "active record" model.

Introduces WorkspaceService as central authority to manage Neos workspaces.

Migration

To migrate existing workspace metadata & roles, run

./flow doctrine:migrate
./flow migrateevents:migrateWorkspaceMetadataToWorkspaceService

(The doctrine migrations definitely have to be executed before the first login!)

Related: #4726

Introduces `WorkspacePublishingService` as replacement for the current Neos `Workspace` "active record" model.

Introduces `WorkspaceService` as central authority to manage Neos workspaces.

Related: #4726
@github-actions github-actions bot added the 9.0 label Jun 17, 2024
Copy link
Member

@mhsdesign mhsdesign left a 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

bwaidelich added a commit that referenced this pull request Aug 2, 2024
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
…orkspace-metadata-and-user-assignment-to-neos
@bwaidelich bwaidelich self-assigned this Sep 18, 2024
Automatically set the current user as `Manager` and role `Neos.Neos:AbstractEditor` as `Collaborator` for new shared workspaces
mhsdesign added a commit to mhsdesign/neos-development-collection that referenced this pull request Oct 8, 2024
Copy link
Member

@mhsdesign mhsdesign left a 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

@mhsdesign mhsdesign merged commit 9b00e8e into 9.0 Oct 9, 2024
3 of 9 checks passed
@mhsdesign mhsdesign deleted the feature/4726-extract-workspace-metadata-and-user-assignment-to-neos branch October 9, 2024 14:24
mhsdesign added a commit to neos/neos-ui that referenced this pull request Oct 9, 2024
* 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]>
@mhsdesign mhsdesign restored the feature/4726-extract-workspace-metadata-and-user-assignment-to-neos branch October 9, 2024 14:26
mhsdesign added a commit to mhsdesign/neos-development-collection that referenced this pull request Oct 10, 2024
neos-bot pushed a commit to neos/contentrepository-core that referenced this pull request Oct 10, 2024
bwaidelich added a commit that referenced this pull request Oct 11, 2024
…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
@mhsdesign mhsdesign deleted the feature/4726-extract-workspace-metadata-and-user-assignment-to-neos branch October 16, 2024 09:37
@mhsdesign mhsdesign mentioned this pull request Oct 29, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants