Commit dd59e6b5 authored by Giorgos Korfiatis's avatar Giorgos Korfiatis
Browse files

astakos: Disallow deletion of accepted users

parent 98e96a84
# Copyright 2012 GRNET S.A. All rights reserved.
# Copyright 2012, 2013, 2014 GRNET S.A. All rights reserved.
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the following
......@@ -162,7 +162,7 @@ class Command(BaseCommand):
help="Delete user"),
help="Delete a non-accepted user"),
......@@ -340,6 +340,9 @@ class Command(BaseCommand):
delete = options.get('delete')
if delete:
if user.is_accepted():
m = "Cannot delete. User %s is accepted." % user
raise CommandError(m)
management.call_command('user-show', str(,
m = "Are you sure you want to permanently delete the user " \
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment