-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Implement undelete and purge API for users #8309
Conversation
This comment has been minimized.
This comment has been minimized.
🎉❤️🎉❤️🎉❤️ |
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.
Great, thank you!
just now noticed #8299 :/ |
I cherry picked the test commits from #8299 and fixed them. This PR now supersedes the other one. |
This comment has been minimized.
This comment has been minimized.
Fixes #930 |
Any chance to cover this old one by me #3843 |
@bernt-matthias I wouldn't tie it to this PR though |
sure |
…sers. Purge now wipes out the username (regardless of gdrp setting) and takes out histories. Undelete should now work.
suggested by nsoranzo
Because multiple inheritance will result in calling this class 'delete' method which is not the correct target. This also avoid a database operation I believe, since the PurgableManagerMixin.purge also calls delete before purging.
@nsoranzo I think I'm not a fan of going from api to manager then to mixin, then same manager again, then same mixin again for one method. It feels confusing so I'd like to avoid that. |
I think these are good abstractions. For reference:
|
I don't think the path manager>mixin>manager>mixin>done is better than manager>done but at this point it seems like a matter of opinion and I will defer to yours. |
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.
Fine for me :)
Refactored the controller vs. manager for the deletion and purge of users. Purge now wipes out the username (regardless of gdrp setting) and takes out histories. Undelete should now work.