mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Adapt broken calls to user_list
This commit is contained in:
parent
9fbd6a1881
commit
f6792d2d00
1 changed files with 8 additions and 10 deletions
|
@ -555,9 +555,7 @@ def app_addaccess(auth, apps, users):
|
||||||
from yunohost.hook import hook_callback
|
from yunohost.hook import hook_callback
|
||||||
|
|
||||||
if not users:
|
if not users:
|
||||||
users = []
|
users = user_list(auth)['users'].keys()
|
||||||
for user in user_list(auth)['users']:
|
|
||||||
users.append(user['username'])
|
|
||||||
|
|
||||||
if not isinstance(users, list): users = [users]
|
if not isinstance(users, list): users = [users]
|
||||||
if not isinstance(apps, list): apps = [apps]
|
if not isinstance(apps, list): apps = [apps]
|
||||||
|
@ -638,11 +636,11 @@ def app_removeaccess(auth, apps, users):
|
||||||
new_users = new_users +','+ allowed_user
|
new_users = new_users +','+ allowed_user
|
||||||
else:
|
else:
|
||||||
new_users = ''
|
new_users = ''
|
||||||
for user in user_list(auth)['users']:
|
for username in user_list(auth)['users'].keys():
|
||||||
if user['username'] not in users:
|
if username not in users:
|
||||||
if new_users == '':
|
if new_users == '':
|
||||||
new_users = user['username']
|
new_users = username
|
||||||
new_users=new_users+','+user['username']
|
new_users += ',' + username
|
||||||
|
|
||||||
app_setting(app, 'allowed_users', new_users.strip())
|
app_setting(app, 'allowed_users', new_users.strip())
|
||||||
hook_callback('post_app_removeaccess', args=[app, new_users])
|
hook_callback('post_app_removeaccess', args=[app, new_users])
|
||||||
|
@ -882,8 +880,8 @@ def app_ssowatconf(auth):
|
||||||
domains = domain_list(auth)['domains']
|
domains = domain_list(auth)['domains']
|
||||||
|
|
||||||
users = {}
|
users = {}
|
||||||
for user in user_list(auth)['users']:
|
for username in user_list(auth)['users'].keys():
|
||||||
users[user['username']] = app_map(user=user['username'])
|
users[username] = app_map(user=username)
|
||||||
|
|
||||||
skipped_urls = []
|
skipped_urls = []
|
||||||
skipped_regex = []
|
skipped_regex = []
|
||||||
|
|
Loading…
Add table
Reference in a new issue