1
0
Fork 0
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:
Josué Tille 2021-01-26 22:21:02 +01:00
parent 5f2ee05c4c
commit 6db9afe60c
No known key found for this signature in database
GPG key ID: 716A6C99B04194EF
3 changed files with 11 additions and 15 deletions

View file

@ -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_permission_url --permission=main --url=$domain/_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=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
ynh_permission_url --permission=server_api --clear_urls
ynh_permission_url --permission=server_api --url=/_matrix --additional_urls=$server_name/.well-known/matrix \
#=================================================
# RELOAD SERVICES

View file

@ -342,11 +342,11 @@ ynh_add_config --template="../sources/update_synapse_for_appservice.sh" --destin
#=================================================
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_create --permission=server_api --url=$domain/_matrix --additional_urls=$server_name/.well-known/matrix \
--label="Server access for client apps." --show_tile=false \
ynh_permission_create --permission=server_api --url=/_matrix --additional_urls=$server_name/.well-known/matrix \
--label="Server access for client apps." --show_tile=false --allowed=visitors \
--auth_header=false --protected=true
#=================================================

View file

@ -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
if !ynh_permission_exists --permission=server_api; then
ynh_permission_create --permission=server_api --url=$domain/_matrix --additional_urls=$server_name/.well-known/matrix \
--label="Server access for client apps." --show_tile=false \
ynh_permission_create --permission=server_api --url=/_matrix --additional_urls=$server_name/.well-known/matrix \
--label="Server access for client apps." --show_tile=false --allowed=visitors \
--auth_header=false --protected=true
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."
else
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
ynh_permission_url --permission=server_api --url=/_matrix --additional_urls=$server_name/.well-known/matrix \
--auth_header=false
ynh_permission_update --permission=server_api --label="Server access for client apps." --show_tile=false \
--protected=true
fi
#=================================================