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

Conversation

mhsdesign
Copy link
Member

@mhsdesign mhsdesign commented Jan 6, 2025

Based on #5417

current.userInformation.personalWorkspaceName (UserService::getPersonalWorkspaceName()) was initially removed in c3f51e2

because with multiple content repositories we cannot find out the value:

public function getPersonalWorkspaceName(): ?string
{
    $currentUser = $this->userDomainService->getCurrentUser();
    $cr = 'default'; // TODO!!!
    $this->workspaceService->getPersonalWorkspaceForUser($cr, $currentUser);
    return $workspace->workspaceName->value;
}

This is luckily no longer needed as the now called NodeAddressToNodeConverter (which we decided to keep in Neos 9.0: #4873)
Will handle this itself through the security in ContentRepository::getContentSubgraph() via #5298

Additionally, this pr makes UserService::getPersonalWorkspaceName() throw and exception to ease upgrading as otherwise NULL will be evaluated.

@mhsdesign mhsdesign marked this pull request as draft January 6, 2025 10:31
@mhsdesign mhsdesign force-pushed the task/fully-remove-userInformation-personalWorkspaceName branch from 1764550 to a03eb24 Compare January 6, 2025 10:32
@mhsdesign mhsdesign marked this pull request as ready for review January 9, 2025 09:53
…kspaceName` in policy for workspaces

`current.userInformation.personalWorkspaceName` (`UserService::getPersonalWorkspaceName()`) was initially removed in c3f51e2

because with multiple content repositories we cannot find out the value:

```php
public function getPersonalWorkspaceName(): ?string
{
    $currentUser = $this->userDomainService->getCurrentUser();
    $cr = 'default'; // TODO!!!
    $this->workspaceService->getPersonalWorkspaceForUser($cr, $currentUser);
    return $workspace->workspaceName->value;
}
```

This is luckily no longer needed as the now called `NodeAddressToNodeConverter` (which we decided to keep in Neos 9.0: neos#4873)
Will handle this itself through the security in `ContentRepository::getContentSubgraph()` via neos#5298

Additionally, this pr makes `UserService::getPersonalWorkspaceName()` throw and exception to ease upgrading as otherwise `NULL` will be evaluated.
@mhsdesign mhsdesign force-pushed the task/fully-remove-userInformation-personalWorkspaceName branch from a03eb24 to f36da15 Compare January 13, 2025 10:53
Copy link
Member

@Sebobo Sebobo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine by reading

@mhsdesign mhsdesign merged commit af030d1 into neos:9.0 Jan 13, 2025
9 checks passed
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.

2 participants