Fix delete_user call to remove all user data
This commit is contained in:
parent
8019994462
commit
8463514a09
1 changed files with 5 additions and 2 deletions
|
@ -651,9 +651,12 @@ def detach_external_login(user, service_name):
|
|||
|
||||
|
||||
def delete_user(user):
|
||||
user.delete_instance(recursive=True, delete_nullable=True)
|
||||
# Delete any repositories under the user's namespace.
|
||||
for repo in list(Repository.select().where(Repository.namespace_user == user)):
|
||||
repository.purge_repository(user.username, repo.name)
|
||||
|
||||
# TODO: also delete any repository data associated
|
||||
# Delete the user itself.
|
||||
user.delete_instance(recursive=True, delete_nullable=True)
|
||||
|
||||
|
||||
def get_pull_credentials(robotname):
|
||||
|
|
Reference in a new issue