diff --git a/scripts/install b/scripts/install index a2fe4aa..c71780e 100644 --- a/scripts/install +++ b/scripts/install @@ -190,8 +190,12 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --l #================================================= ynh_script_progression --message="Configuring SSOwat..." --weight=1 -# Make app public if necessary or protect it -[ $is_public -eq 0 ] || ynh_permission_update --permission "main" --add "visitors" +# Make app public if necessary +if [ $is_public -eq 1 ] +then + # unprotected_uris allows SSO credentials to be passed anyway. + ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" +fi #================================================= # RELOAD NGINX diff --git a/scripts/upgrade b/scripts/upgrade index af80fa4..61055b2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -182,6 +182,18 @@ yunohost service add $app --description "Collaborative Markdown notes" --log="/v # Set permissions on app files chown -R $app:$app $final_path +#================================================= +# SETUP SSOWAT +#================================================= +ynh_script_progression --message="Upgrading SSOwat configuration..." --time --weight=1 + +# Make app public if necessary +if [ $is_public -eq 1 ] +then + # unprotected_uris allows SSO credentials to be passed anyway + ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" +fi + #================================================= # START SYSTEMD SERVICE #=================================================