Revision 0c46608c snf-astakos-app/astakos/im/management/commands/user-list.py
b/snf-astakos-app/astakos/im/management/commands/user-list.py | ||
---|---|---|
74 | 74 |
'uuid'] |
75 | 75 |
|
76 | 76 |
option_list = ListCommand.option_list + ( |
77 |
make_option('-p', |
|
78 |
action='store_true', |
|
79 |
dest='pending', |
|
80 |
default=False, |
|
81 |
help="List only users pending activation"), |
|
82 | 77 |
make_option('--auth-providers', |
83 | 78 |
action='store_true', |
84 | 79 |
dest='auth_providers', |
... | ... | |
89 | 84 |
dest='groups', |
90 | 85 |
default=None, |
91 | 86 |
help="Only show users that belong to the specified goups"), |
92 |
make_option('-n', |
|
93 |
action='store_true', |
|
94 |
dest='pending_send_mail', |
|
95 |
default=False, |
|
96 |
help="List only users who have not received activation"), |
|
97 | 87 |
make_option('--active', |
98 | 88 |
action='store_true', |
99 | 89 |
dest='active', |
... | ... | |
117 | 107 |
) |
118 | 108 |
|
119 | 109 |
def handle_args(self, *args, **options): |
120 |
if options['pending']: |
|
121 |
self.filters['is_active'] = False |
|
122 |
|
|
123 |
if options['pending_send_mail']: |
|
124 |
self.filters['is_active'] = False |
|
125 |
self.filters['activation_sent'] = None |
|
126 |
|
|
127 | 110 |
if options['active']: |
128 | 111 |
self.filters['is_active'] = True |
129 | 112 |
|
Also available in: Unified diff