mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #902 from YunoHost/remove-redirect-after-the-postinstall
Remove redirected_urls after postinstall
This commit is contained in:
commit
6571183ab3
2 changed files with 0 additions and 17 deletions
|
@ -303,11 +303,6 @@ def tools_postinstall(operation_logger, domain, password, ignore_dyndns=False,
|
||||||
else:
|
else:
|
||||||
ssowat_conf = read_json('/etc/ssowat/conf.json.persistent')
|
ssowat_conf = read_json('/etc/ssowat/conf.json.persistent')
|
||||||
|
|
||||||
if 'redirected_urls' not in ssowat_conf:
|
|
||||||
ssowat_conf['redirected_urls'] = {}
|
|
||||||
|
|
||||||
ssowat_conf['redirected_urls']['/'] = domain + '/yunohost/admin'
|
|
||||||
|
|
||||||
write_to_json('/etc/ssowat/conf.json.persistent', ssowat_conf)
|
write_to_json('/etc/ssowat/conf.json.persistent', ssowat_conf)
|
||||||
os.system('chmod 644 /etc/ssowat/conf.json.persistent')
|
os.system('chmod 644 /etc/ssowat/conf.json.persistent')
|
||||||
|
|
||||||
|
|
|
@ -196,18 +196,6 @@ def user_create(operation_logger, username, firstname, lastname, mail, password,
|
||||||
if not ldap.search(base='ou=users,dc=yunohost,dc=org', filter='uid=*'):
|
if not ldap.search(base='ou=users,dc=yunohost,dc=org', filter='uid=*'):
|
||||||
attr_dict['mail'] = [attr_dict['mail']] + aliases
|
attr_dict['mail'] = [attr_dict['mail']] + aliases
|
||||||
|
|
||||||
# If exists, remove the redirection from the SSO
|
|
||||||
if not os.path.exists('/etc/ssowat/conf.json.persistent'):
|
|
||||||
ssowat_conf = {}
|
|
||||||
else:
|
|
||||||
ssowat_conf = read_json('/etc/ssowat/conf.json.persistent')
|
|
||||||
|
|
||||||
if 'redirected_urls' in ssowat_conf and '/' in ssowat_conf['redirected_urls']:
|
|
||||||
del ssowat_conf['redirected_urls']['/']
|
|
||||||
|
|
||||||
write_to_json('/etc/ssowat/conf.json.persistent', ssowat_conf)
|
|
||||||
os.system('chmod 644 /etc/ssowat/conf.json.persistent')
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
ldap.add('uid=%s,ou=users' % username, attr_dict)
|
ldap.add('uid=%s,ou=users' % username, attr_dict)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
Loading…
Add table
Reference in a new issue