mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Simplify if
This commit is contained in:
parent
a7432393c1
commit
ad04c33cbf
1 changed files with 3 additions and 3 deletions
|
@ -85,10 +85,10 @@ def user_permission_list(short=False, full=False, ignore_system_perms=False, ful
|
||||||
|
|
||||||
if full:
|
if full:
|
||||||
permissions[name]["corresponding_users"] = [_ldap_path_extract(p, "uid") for p in infos.get('inheritPermission', [])]
|
permissions[name]["corresponding_users"] = [_ldap_path_extract(p, "uid") for p in infos.get('inheritPermission', [])]
|
||||||
permissions[name]["auth_header"] = False if infos.get("authHeader", [False])[0] == "FALSE" else True
|
permissions[name]["auth_header"] = infos.get("authHeader", [False])[0] == "TRUE"
|
||||||
permissions[name]["label"] = infos.get("label", [None])[0]
|
permissions[name]["label"] = infos.get("label", [None])[0]
|
||||||
permissions[name]["show_tile"] = False if infos.get("showTile", [False])[0] == "FALSE" else True
|
permissions[name]["show_tile"] = infos.get("showTile", [False])[0] == "TRUE"
|
||||||
permissions[name]["protected"] = False if infos.get("isProtected", [False])[0] == "FALSE" else True
|
permissions[name]["protected"] = infos.get("isProtected", [False])[0] == "TRUE"
|
||||||
if full_path and name.split(".")[0] not in SYSTEM_PERMS:
|
if full_path and name.split(".")[0] not in SYSTEM_PERMS:
|
||||||
permissions[name]["url"] = _complete_url(infos.get("URL", [None])[0], name)
|
permissions[name]["url"] = _complete_url(infos.get("URL", [None])[0], name)
|
||||||
permissions[name]["additional_urls"] = [_complete_url(url, name) for url in infos.get("additionalUrls", [None])]
|
permissions[name]["additional_urls"] = [_complete_url(url, name) for url in infos.get("additionalUrls", [None])]
|
||||||
|
|
Loading…
Add table
Reference in a new issue