-
Notifications
You must be signed in to change notification settings - Fork 164
cli: add user deletion #2975
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
base: master
Are you sure you want to change the base?
cli: add user deletion #2975
Conversation
This PR was automatically marked as stale. |
This PR was automatically marked as stale. |
i would move that to invenio-accounts. on invenio-accounts cli we have users-create we should group those commands together |
|
||
from invenio_rdm_records.proxies import current_rdm_records_service | ||
|
||
drafts = current_rdm_records_service.search_drafts(idty) |
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.
why is it not possible to delete a user if drafts are still active? in my opinion it should not matter where a user is registered or part of, if the user wants that their personal data should be deleted it should be deleted. the discussion is how to handle that situation in a way that it doesn't crashes the system
from invenio_oauthclient.models import RemoteAccount, RemoteToken, UserIdentity | ||
from invenio_users_resources.proxies import current_users_service | ||
|
||
with db.session.begin_nested(): |
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.
this one should be moved to a dedicated api/model class
No description provided.