Remove alternate keys storage during user delete#29144
Conversation
There was a problem hiding this comment.
Can't we do this in a event? This belongs to encryption - this should not live in the user class
e6ec3c6 to
c4e7132
Compare
|
Updated the PR with the help of event dispatcher. And hence there is another bit to be reviewed which is associated with this PR: owncloud/encryption#16 |
There was a problem hiding this comment.
no - this way we have a specific event in here. Please use a generic event name which allows any code to integrate in here.
There was a problem hiding this comment.
Why do not we use just preDelete hooks in here? If we are planning to remove hooks, imho we should use more generic event like oc.user.postdelete.
Also, symfony has some naming conventions on the EventDispatcher, It may be beneficial for us to adhere to these rules:
-Use only lowercase letters, numbers, dots (.) and underscores (_);
-Prefix names with a namespace followed by a dot (e.g. order., user.*);
-End names with a verb that indicates what action has been taken (e.g. order.placed).
https://symfony.com/doc/current/components/event_dispatcher.html#naming-conventions
When user is deleted the alternate key storage location does have folder with username. So while deleting user this should also be cleaned up. Signed-off-by: Sujith H <sharidasan@owncloud.com>
c4e7132 to
32a1177
Compare
|
Got another idea, why not call https://github.com/owncloud/encryption/pull/16/files#diff-ef2f85587bb2300b22909edff73c7440L198. We already have post delete user hook in the encryption app. Let me know if this looks ok? |
nice - thats the way to go - we can close this pr then - right? |
|
Yes we can merge this change. |
|
Created backport : #29155 |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
When user is deleted the alternate key storage location
does have folder with username. So while deleting user
this should also be cleaned up.
Signed-off-by: Sujith H sharidasan@owncloud.com
Description
Remove alternate key storage location during user delete process.
Related Issue
#26936
Motivation and Context
When user is deleted, the alternate key storage location which has folder name with username should
also be deleted.
How Has This Been Tested?
enckeysuser1apart from useradminuser1user1and login asadminuser1, there shouldn't be any traces ofuser1inside the folderenckeysScreenshots (if appropriate):
Types of changes
Checklist: