mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
Change get-group-users to a simpler implementation
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
1a095564b0
commit
a50b40ee56
2 files changed
+19
-17
No files matched your search
@@ -111,9 +111,8 @@ def get_last_admin_user():
|
||||
""" Check if there is only one admin user
|
||||
if yes return its name else return None
|
||||
"""
|
||||
admin_users = actions.superuser_run('users',
|
||||
['get-group-users','admin']
|
||||
).strip().split('\n')
|
||||
if len(admin_users) > 1:
|
||||
return None
|
||||
return admin_users[0]
|
||||
admin_users = actions.superuser_run(
|
||||
'users', ['get-group-users', 'admin']).strip().split('\n')
|
||||
if len(admin_users) == 1:
|
||||
return admin_users[0]
|
||||
return None
|
||||
Reference in new issue
Block a user