-
-
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
BUGFIX: Remove users personal workspace on user deletion #5470
base: 9.0
Are you sure you want to change the base?
BUGFIX: Remove users personal workspace on user deletion #5470
Conversation
With neos#5146 indeed most problems outlined in neos#4566 were solved. Now one non-feature point is kindof left open: > a user Foo has a personal workspace named user-Foo. If the user is deleted and a new user named Foo is created it will use the previously still existent workspace user-Foo. In the current state this will no longer happen as `WorkspaceService::getPersonalWorkspaceForUser` operates on the neos UUID user identifier and not the name of the account. Recreating a new user with the same name would mean it will get the workspace `Foo2`. So the only part that is not "fixed" yet is that deleting a user does not cleanup its workspaces. This change adds a query to determine all content repositories a user was active in and then proceeds to delete the workspaces.
An alternative - possible more stable solution would be: Let the workspaces be orphaned for a while and have a cleanup command to take care of them. Doing the deletion across all repositories from the UserService and that one request is dangerous as if any of the crs contain an error the whole deletion fails partly. A cleanup cr command might seem inevitable after all all alone to rebase all users workspaces for once in a while. That could then check if any unknown user ids are in the workspace metadata and go a head to clean them. So i like this change but a second after making it im doubting it already :D |
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.
I agree that personal workspace deletion should happen when users are deleted
+1
@nezaniel and me discussed that we prefer a synchronous behaviour as provided via this pr for now due to the fact that any commands to cleanup things have to be remembered and actually used once in a while. A cronjob is no requirement for neos and for the case a cr cannot be instantiated or is not up to date, deleting a user is not the major concern :) Thus lets have this 8.3 like approach for now. |
also as Neos 9 betas have been around for a while we also might need a migration strategy for old user workspace where the users where deleted. Deletion of such "orphaned" workspaces is not possible via CLI or workspace module:
I would say we can either offer a migration to handle that or simply respect the
which should impose no problem as the user will get a new workspace assigned after login. |
With #5146 indeed most problems outlined in #4566 were solved. Now one non-feature point is kindof left open:
In the current state this will no longer happen as
WorkspaceService::getPersonalWorkspaceForUser
operates on the neos UUID user identifier and not the name of the account. Recreating a new user with the same name would mean it will get the workspaceFoo2
. So the only part that is not "fixed" yet is that deleting a user does not cleanup its workspaces.This change adds a query to determine all content repositories a user was active in and then proceeds to delete the workspaces.
Upgrade instructions
Review instructions
Checklist
FEATURE|TASK|BUGFIX
!!!
and have upgrade-instructions