Commit 0d20e11c authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

in user commands consider astakos_groups instead of groups

parent 88f65afa
......@@ -71,7 +71,7 @@ class Command(BaseCommand):
elif options['pending_send_mail']:
users = users.filter(is_active=False, activation_sent=None)
labels = ('id', 'email', 'real name', 'active', 'admin', 'provider', 'groups')
labels = ('id', 'email', 'real name', 'active', 'admin', 'provider')
columns = (3, 24, 24, 6, 5, 12, 24)
if not options['csv']:
......@@ -84,8 +84,7 @@ class Command(BaseCommand):
id = str(user.id)
active = format_bool(user.is_active)
admin = format_bool(user.is_superuser)
fields = (id, user.email, user.realname, active, admin, user.provider,
','.join([g.name for g in user.astakos_groups.all()]))
fields = (id, user.email, user.realname, active, admin, user.provider)
if options['csv']:
line = '|'.join(fields)
......
......@@ -74,13 +74,14 @@ class Command(BaseCommand):
'provider': user.provider,
'verified': format_bool(user.is_verified),
'has_credits': format_bool(user.has_credits),
'groups': [elem.name for elem in user.groups.all()],
'groups': [elem.name for elem in user.astakos_groups.all()],
'permissions': [elem.codename for elem in user.user_permissions.all()],
'group_permissions': user.get_group_permissions(),
'third_party_identifier': user.third_party_identifier,
'email_verified': format_bool(user.email_verified),
'username': user.username,
'activation_sent_date': format_date(user.activation_sent)
'activation_sent_date': format_date(user.activation_sent),
'resources' : user.quota
}
if get_latest_terms():
has_signed_terms = user.signed_terms()
......
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