mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
users: Minor cosmetic refactoring
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
b01ac54dd3
commit
e1e654554e
@ -125,11 +125,11 @@ def register_group(group):
|
||||
|
||||
|
||||
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 there is only one admin user return its name else return None."""
|
||||
output = actions.superuser_run('users', ['get-group-users', 'admin'])
|
||||
admin_users = output.strip().split('\n')
|
||||
|
||||
if len(admin_users) == 1:
|
||||
return admin_users[0]
|
||||
|
||||
return None
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user