1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/cesium_ynh.git synced 2024-09-03 18:06:25 +02:00

[feat] #19: Set Cesium in read-only mode when set public

This commit is contained in:
Robles Rodolphe 2020-06-12 16:32:58 +02:00 committed by Moul
parent 99330d46e4
commit 0598701bb1
2 changed files with 6 additions and 0 deletions

View file

@ -37,6 +37,9 @@ cp $nginx_conf /etc/nginx/conf.d/$domain.d/$app.conf
if [[ $is_public -eq 1 ]]; then if [[ $is_public -eq 1 ]]; then
# unprotected_uris allows SSO credentials to be passed anyway. # unprotected_uris allows SSO credentials to be passed anyway.
ynh_app_setting_set "$app" unprotected_uris "/" ynh_app_setting_set "$app" unprotected_uris "/"
# activate read-only mode
ynh_replace_string --match_string='"readonly": false,' --replace_string='"readonly": true,' --target_file="$src_path/config.js"
fi fi
# Reload nginx service # Reload nginx service

View file

@ -46,6 +46,9 @@ cp $nginx_conf /etc/nginx/conf.d/$domain.d/$app.conf
# If app is public, add url to SSOWat conf as skipped_uris # If app is public, add url to SSOWat conf as skipped_uris
if [[ $is_public -eq 1 ]]; then if [[ $is_public -eq 1 ]]; then
ynh_app_setting_set "$app" unprotected_uris "/" ynh_app_setting_set "$app" unprotected_uris "/"
# activate read-only mode
ynh_replace_string --match_string='"readonly": false,' --replace_string='"readonly": true,' --target_file="$src_path/config.js"
fi fi
# Reload nginx service # Reload nginx service