feat: Delete chat messages and assignments when user is deleted#604
Conversation
…top running assignments Signed-off-by: Jana Peper <jana.peper@nextcloud.com>
|
/backport to stable34 |
| $userId = $event->getUid(); | ||
|
|
||
| try { | ||
| $this->assignmentsService->deleteAllForUser($userId); |
There was a problem hiding this comment.
We don't cleanup the jobs created by SessionSummaryService. I think we should check if there are some jobs scheduled for the user and remove them from the bg job queue.
There was a problem hiding this comment.
Pushed a new commit that does both.
| throw new UnauthorizedException(); | ||
| } | ||
| if ($this->userManager->get($userId) === null) { | ||
| $this->deleteAllForUser($userId); |
There was a problem hiding this comment.
Should we also clean everything up here? The chat sessions+messages and the summary bg jobs?
There was a problem hiding this comment.
What do you mean, they should already be cleaned up via listener, right?
There was a problem hiding this comment.
If some users where deleted before this PR, there can still be data hanging around.
There was a problem hiding this comment.
Fair, but maybe that should be a migration step and not solved here?
There was a problem hiding this comment.
Yep, a repair step seems appropriate.
There was a problem hiding this comment.
A repair step makes sense for this.
|
@lukasdotcom Wdyt of my review comments? |
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
|
The backport to # Switch to the target branch and update it
git checkout stable34
git pull origin stable34
# Create the new backport branch
git checkout -b backport/604/stable34
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 8165fab7 72456875
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/604/stable34Error: Failed to check for changes with origin/stable34: No changes found in backport branch Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. |
No description provided.