mirror of
https://github.com/YunoHost-Apps/synapse_ynh.git
synced 2024-09-03 20:26:38 +02:00
Improve permissions
This commit is contained in:
parent
5f2ee05c4c
commit
6db9afe60c
3 changed files with 11 additions and 15 deletions
|
@ -118,13 +118,8 @@ ynh_add_config --template="log.yaml" --destination="/etc/matrix-$app/log.yaml"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_script_progression --message="Configuring permissions..." --weight=1
|
ynh_script_progression --message="Configuring permissions..." --weight=1
|
||||||
|
ynh_permission_url --permission=server_api --clear_urls
|
||||||
ynh_permission_url --permission=main --url=$domain/_matrix/cas_server.php/login --auth_header=true
|
ynh_permission_url --permission=server_api --url=/_matrix --additional_urls=$server_name/.well-known/matrix \
|
||||||
ynh_permission_update --permission=main --label="Synapse server SSO authentication" --show_tile=false --protected=true
|
|
||||||
|
|
||||||
ynh_permission_update --permission=server_api --url=$domain/_matrix --additional_urls=$server_name/.well-known/matrix \
|
|
||||||
--label="Server access for client apps." --show_tile=false \
|
|
||||||
--auth_header=false --protected=true
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD SERVICES
|
# RELOAD SERVICES
|
||||||
|
|
|
@ -342,11 +342,11 @@ ynh_add_config --template="../sources/update_synapse_for_appservice.sh" --destin
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring permissions..." --weight=1
|
ynh_script_progression --message="Configuring permissions..." --weight=1
|
||||||
|
|
||||||
ynh_permission_url --permission=main --url=$domain/_matrix/cas_server.php/login --auth_header=true
|
ynh_permission_url --permission=main --url=/_matrix/cas_server.php/login --auth_header=true
|
||||||
ynh_permission_update --permission=main --label="Synapse server SSO authentication" --show_tile=false --protected=true
|
ynh_permission_update --permission=main --label="Synapse server SSO authentication" --show_tile=false --protected=true
|
||||||
|
|
||||||
ynh_permission_create --permission=server_api --url=$domain/_matrix --additional_urls=$server_name/.well-known/matrix \
|
ynh_permission_create --permission=server_api --url=/_matrix --additional_urls=$server_name/.well-known/matrix \
|
||||||
--label="Server access for client apps." --show_tile=false \
|
--label="Server access for client apps." --show_tile=false --allowed=visitors \
|
||||||
--auth_header=false --protected=true
|
--auth_header=false --protected=true
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -403,15 +403,16 @@ ynh_permission_url --permission=main --url=$domain/_matrix/cas_server.php/login
|
||||||
ynh_permission_update --permission=main --label="Synapse server SSO authentication" --show_tile=false --protected=true
|
ynh_permission_update --permission=main --label="Synapse server SSO authentication" --show_tile=false --protected=true
|
||||||
|
|
||||||
if !ynh_permission_exists --permission=server_api; then
|
if !ynh_permission_exists --permission=server_api; then
|
||||||
ynh_permission_create --permission=server_api --url=$domain/_matrix --additional_urls=$server_name/.well-known/matrix \
|
ynh_permission_create --permission=server_api --url=/_matrix --additional_urls=$server_name/.well-known/matrix \
|
||||||
--label="Server access for client apps." --show_tile=false \
|
--label="Server access for client apps." --show_tile=false --allowed=visitors \
|
||||||
--auth_header=false --protected=true
|
--auth_header=false --protected=true
|
||||||
python3 remove_sso_conf_persistent.py $domain $server_name \
|
python3 remove_sso_conf_persistent.py $domain $server_name \
|
||||||
|| ynh_print_warn --message="Your file /etc/ssowat/conf.json.persistent doesn't respect the json syntax. The config file wasn't cleaned. Please clean it manually."
|
|| ynh_print_warn --message="Your file /etc/ssowat/conf.json.persistent doesn't respect the json syntax. The config file wasn't cleaned. Please clean it manually."
|
||||||
else
|
else
|
||||||
ynh_permission_update --permission=server_api --url=$domain/_matrix --additional_urls=$server_name/.well-known/matrix \
|
ynh_permission_url --permission=server_api --url=/_matrix --additional_urls=$server_name/.well-known/matrix \
|
||||||
--label="Server access for client apps." --show_tile=false \
|
--auth_header=false
|
||||||
--auth_header=false --protected=true
|
ynh_permission_update --permission=server_api --label="Server access for client apps." --show_tile=false \
|
||||||
|
--protected=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue