Revision 84f6149c snf-astakos-app/astakos/im/management/commands/user-modify.py
b/snf-astakos-app/astakos/im/management/commands/user-modify.py | ||
---|---|---|
1 |
# Copyright 2012 GRNET S.A. All rights reserved. |
|
1 |
# Copyright 2012, 2013, 2014 GRNET S.A. All rights reserved.
|
|
2 | 2 |
# |
3 | 3 |
# Redistribution and use in source and binary forms, with or |
4 | 4 |
# without modification, are permitted provided that the following |
... | ... | |
162 | 162 |
make_option('--delete', |
163 | 163 |
dest='delete', |
164 | 164 |
action='store_true', |
165 |
help="Delete user"), |
|
165 |
help="Delete a non-accepted user"),
|
|
166 | 166 |
) |
167 | 167 |
|
168 | 168 |
@transaction.commit_on_success |
... | ... | |
340 | 340 |
|
341 | 341 |
delete = options.get('delete') |
342 | 342 |
if delete: |
343 |
if user.is_accepted(): |
|
344 |
m = "Cannot delete. User %s is accepted." % user |
|
345 |
raise CommandError(m) |
|
343 | 346 |
management.call_command('user-show', str(user.pk), |
344 | 347 |
list_quotas=True) |
345 | 348 |
m = "Are you sure you want to permanently delete the user " \ |
Also available in: Unified diff