Revision ffb5cca1 snf-astakos-app/astakos/im/management/commands/user-list.py
b/snf-astakos-app/astakos/im/management/commands/user-list.py | ||
---|---|---|
37 | 37 |
from synnefo.webproject.management.commands import ListCommand |
38 | 38 |
|
39 | 39 |
|
40 |
def get_providers(user): |
|
41 |
return ','.join( |
|
42 |
[unicode(auth) for auth in user.auth_providers.filter(active=True)] |
|
43 |
) |
|
44 |
|
|
45 |
|
|
46 |
def get_groups(user): |
|
47 |
return ','.join(user.groups.all().values_list('name', flat=True)) |
|
48 |
|
|
49 |
|
|
40 | 50 |
class Command(ListCommand): |
41 | 51 |
help = "List users" |
42 | 52 |
|
43 | 53 |
object_class = AstakosUser |
44 | 54 |
|
45 |
def get_providers(user): |
|
46 |
return ','.join( |
|
47 |
[unicode(auth) for auth in user.auth_providers.filter(active=True)] |
|
48 |
) |
|
49 |
|
|
50 |
def get_groups(user): |
|
51 |
return ','.join(user.groups.all().values_list('name', flat=True)) |
|
52 |
|
|
53 | 55 |
FIELDS = { |
54 | 56 |
'id': ('id', ('The id of the user')), |
55 | 57 |
'real name': ('realname', 'The name of the user'), |
Also available in: Unified diff