mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
user_permission_list: also support filtering for apps not installed or system perms
This commit is contained in:
parent
8b360ac2e6
commit
7989271e74
1 changed files with 7 additions and 5 deletions
|
@ -74,13 +74,12 @@ def user_permission_list(
|
||||||
)
|
)
|
||||||
|
|
||||||
# Parse / organize information to be outputed
|
# Parse / organize information to be outputed
|
||||||
if apps:
|
installed_apps = sorted(_installed_apps())
|
||||||
ignore_system_perms = True
|
apps = apps if apps else installed_apps
|
||||||
apps = apps if apps else sorted(_installed_apps())
|
|
||||||
apps_base_path = {
|
apps_base_path = {
|
||||||
app: app_setting(app, "domain") + app_setting(app, "path")
|
app: app_setting(app, "domain") + app_setting(app, "path")
|
||||||
for app in apps
|
for app in apps
|
||||||
if app_setting(app, "domain") and app_setting(app, "path")
|
if app in installed_apps and app_setting(app, "domain") and app_setting(app, "path")
|
||||||
}
|
}
|
||||||
|
|
||||||
permissions = {}
|
permissions = {}
|
||||||
|
@ -89,7 +88,10 @@ def user_permission_list(
|
||||||
name = infos["cn"][0]
|
name = infos["cn"][0]
|
||||||
app = name.split(".")[0]
|
app = name.split(".")[0]
|
||||||
|
|
||||||
if app in SYSTEM_PERMS and ignore_system_perms:
|
if ignore_system_perms and app in SYSTEM_PERMS:
|
||||||
|
continue
|
||||||
|
|
||||||
|
if app not in apps:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
perm = {}
|
perm = {}
|
||||||
|
|
Loading…
Add table
Reference in a new issue