mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Add domain_root_only restriction to app manifests
And add app label to app map
This commit is contained in:
parent
81b460f74d
commit
44eca531a2
1 changed files with 4 additions and 0 deletions
|
@ -221,6 +221,7 @@ def app_map(app=None, raw=False):
|
|||
'label': app_settings['label'],
|
||||
'uid': app_settings['uid'],
|
||||
'instance': app_settings['instance'],
|
||||
'mode': app_settings['mode'],
|
||||
}
|
||||
else:
|
||||
result['https://'+app_settings['domain']+app_settings['path']] = app_settings['label']
|
||||
|
@ -408,6 +409,9 @@ def app_install(app, domain, path='/', label=None, mode='private'):
|
|||
if app_path in path and app_path.count('/') < path.count('/'):
|
||||
raise YunoHostError(1, _("Unable to install app at this location"))
|
||||
|
||||
if path != '/' and lvl(manifest, 'yunohost', 'webapp', 'domain_root_only') and is_true(manifest['yunohost']['domain_root_only']):
|
||||
raise YunoHostError(1, _("App must be installed to domain root"))
|
||||
|
||||
|
||||
##########################################
|
||||
# Fetch or extract sources #
|
||||
|
|
Loading…
Add table
Reference in a new issue