From 0399f9953796bc258ee12bfdf3fd04302617ec9f Mon Sep 17 00:00:00 2001 From: titoko titoko Date: Tue, 3 Dec 2013 17:45:15 +0100 Subject: [PATCH] yunohost app skipped_uri --- yunohost_app.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/yunohost_app.py b/yunohost_app.py index 5ba9c169..24e5688e 100644 --- a/yunohost_app.py +++ b/yunohost_app.py @@ -686,6 +686,17 @@ def app_ssowatconf(): for user in user_list()['Users']: users[user['Username']] = app_map(user=user['Username']) + skipped_uri=[] + apps={} + for app in app_list()['Apps']: + with open(apps_setting_path + app['ID'] +'/settings.yml') as f: + app_settings = yaml.load(f) + if 'skipped_uris' in app_settings: + skipped_uri=[app_settings['domain'] + app_settings['path'][:-1] + item for item in app_settings['skipped_uris'].split(',')] + + for domain in domains: + skipped_uri.extend([domain +'/ynhadmin', domain +'/ynhapi']) + conf_dict = { 'portal_domain': main_domain, 'portal_path': '/ynhsso/', @@ -698,7 +709,7 @@ def app_ssowatconf(): 'Email': 'mail' }, 'domains': domains, - 'skipped_urls': [main_domain +'/ynhadmin', main_domain +'/ynhapi'], + 'skipped_urls': skipped_uri, 'unprotected_urls': [], 'users': users }