-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Adding support to remove data from deleted users, fixes #32 #110
Conversation
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.
You have to use hooks for it..
https://docs.nextcloud.com/server/14/developer_manual/app/hooks.html#available-hooks
Not sure I understand, can you clarify? I already explained why hooks are not an option in associated issue #32. Do you mean that or some other hooks? |
Ohh.. Now remember it.. 😞 |
Filed issue nextcloud/server#14004, but I would not hold my breath on this:) Friendly ping for you to take a look:) |
9407f36
to
2c4c8ce
Compare
OK, completely changed this pull request! Removed everything and replaced with hook. No tests, though (test for reset already exist). BTW, you can easily try it out with simple P.S. I was lucky to extract reset functionality into separate commit (c4d1b2f), so stuff here were easy to refactor. |
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.
Beautiful.. 😅
Just to be sure, when you were talking about business logic, you referring to using a single command that executes all the tasks? |
Yeah, in the sense "all of background processing". I think of it as all classes under Tasks. But, ignore my comments about "grouping business logic together", business logic is in Watcher.php too... |
If user is deleted from Nextcloud, all files from that users are also deleted. However, we don't have callback for that, and we end up with bunch of images/faces/persons in database which do not exist anymore, either in filecache or physically, on disk. Since those stuff can pile up, best is to clean them from time to time, and we use another task for that.
Tests also added.