mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
commit
ede8fed77e
1 changed files with 33 additions and 31 deletions
|
@ -399,6 +399,8 @@ def app_map(app=None, raw=False, user=None):
|
||||||
continue
|
continue
|
||||||
if 'domain' not in app_settings:
|
if 'domain' not in app_settings:
|
||||||
continue
|
continue
|
||||||
|
if 'no_sso' in app_settings: # I don't think we need to check for the value here
|
||||||
|
continue
|
||||||
if user is not None:
|
if user is not None:
|
||||||
if ('mode' not in app_settings
|
if ('mode' not in app_settings
|
||||||
or ('mode' in app_settings
|
or ('mode' in app_settings
|
||||||
|
@ -1270,10 +1272,6 @@ def app_ssowatconf(auth):
|
||||||
main_domain = _get_maindomain()
|
main_domain = _get_maindomain()
|
||||||
domains = domain_list(auth)['domains']
|
domains = domain_list(auth)['domains']
|
||||||
|
|
||||||
users = {}
|
|
||||||
for username in user_list(auth)['users'].keys():
|
|
||||||
users[username] = app_map(user=username)
|
|
||||||
|
|
||||||
skipped_urls = []
|
skipped_urls = []
|
||||||
skipped_regex = []
|
skipped_regex = []
|
||||||
unprotected_urls = []
|
unprotected_urls = []
|
||||||
|
@ -1284,7 +1282,7 @@ def app_ssowatconf(auth):
|
||||||
redirected_urls = {}
|
redirected_urls = {}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
apps_list = app_list()['apps']
|
apps_list = app_list(installed=True)['apps']
|
||||||
except:
|
except:
|
||||||
apps_list = []
|
apps_list = []
|
||||||
|
|
||||||
|
@ -1293,9 +1291,12 @@ def app_ssowatconf(auth):
|
||||||
return s.split(',') if s else []
|
return s.split(',') if s else []
|
||||||
|
|
||||||
for app in apps_list:
|
for app in apps_list:
|
||||||
if _is_installed(app['id']):
|
|
||||||
with open(APPS_SETTING_PATH + app['id'] + '/settings.yml') as f:
|
with open(APPS_SETTING_PATH + app['id'] + '/settings.yml') as f:
|
||||||
app_settings = yaml.load(f)
|
app_settings = yaml.load(f)
|
||||||
|
|
||||||
|
if 'no_sso' in app_settings:
|
||||||
|
continue
|
||||||
|
|
||||||
for item in _get_setting(app_settings, 'skipped_uris'):
|
for item in _get_setting(app_settings, 'skipped_uris'):
|
||||||
if item[-1:] == '/':
|
if item[-1:] == '/':
|
||||||
item = item[:-1]
|
item = item[:-1]
|
||||||
|
@ -1343,7 +1344,8 @@ def app_ssowatconf(auth):
|
||||||
'protected_regex': protected_regex,
|
'protected_regex': protected_regex,
|
||||||
'redirected_urls': redirected_urls,
|
'redirected_urls': redirected_urls,
|
||||||
'redirected_regex': redirected_regex,
|
'redirected_regex': redirected_regex,
|
||||||
'users': users,
|
'users': {username: app_map(user=username)
|
||||||
|
for username in user_list(auth)['users'].keys()},
|
||||||
}
|
}
|
||||||
|
|
||||||
with open('/etc/ssowat/conf.json', 'w+') as f:
|
with open('/etc/ssowat/conf.json', 'w+') as f:
|
||||||
|
|
Loading…
Add table
Reference in a new issue