-
Notifications
You must be signed in to change notification settings - Fork 2k
Add ckan user clean command #7241
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
Conversation
For now I'm trying to keep a logic that do not delete the user if the image cannot be deleted. (Permission issues, ..., ?) This is to avoid leaving unreferenced images in the store. |
The second issue I'm getting is that this logic is aggressive and considers a user account as spam if they have a wrong file in the image. What about false positives? What if the administrator forgets one mimetype? |
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.
Looks good @pdelboca only one minor tweak
Co-authored-by: Adrià Mercader <[email protected]>
Done @amercader ! Failing Cypress test seems unrelated. |
Fixes #7225 part of #7208
Proposed fixes:
This PR adds a new command
ckan clean users
that will scan the system for users with invalid images and delete both the image and the user from the database.Invalid images are all images that doesn't contain allowed mimetypes set in
ckan.upload.user.mimetypes
config option.Features:
Please [X] all the boxes above that apply