mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
permissions in app_info
This commit is contained in:
parent
99b0a4184d
commit
db9d2aac30
1 changed files with 4 additions and 0 deletions
|
@ -153,6 +153,8 @@ def app_info(app, full=False):
|
||||||
"""
|
"""
|
||||||
Get info for a specific app
|
Get info for a specific app
|
||||||
"""
|
"""
|
||||||
|
from yunohost.permission import user_permission_list
|
||||||
|
|
||||||
if not _is_installed(app):
|
if not _is_installed(app):
|
||||||
raise YunohostError('app_not_installed', app=app, all_apps=_get_all_installed_apps_id())
|
raise YunohostError('app_not_installed', app=app, all_apps=_get_all_installed_apps_id())
|
||||||
|
|
||||||
|
@ -180,6 +182,8 @@ def app_info(app, full=False):
|
||||||
ret['supports_backup_restore'] = (os.path.exists(os.path.join(APPS_SETTING_PATH, app, "scripts", "backup")) and
|
ret['supports_backup_restore'] = (os.path.exists(os.path.join(APPS_SETTING_PATH, app, "scripts", "backup")) and
|
||||||
os.path.exists(os.path.join(APPS_SETTING_PATH, app, "scripts", "restore")))
|
os.path.exists(os.path.join(APPS_SETTING_PATH, app, "scripts", "restore")))
|
||||||
ret['supports_multi_instance'] = is_true(local_manifest.get("multi_instance", False))
|
ret['supports_multi_instance'] = is_true(local_manifest.get("multi_instance", False))
|
||||||
|
permissions = user_permission_list(full=True, full_path=True)["permissions"]
|
||||||
|
ret['permissions'] = {p: i for p, i in permissions.items() if p.startswith(app + ".") and (i["url"] or i['additional_urls'])}
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue