diff --git a/manifest.json b/manifest.json index 69cbe6f..2d8f9e8 100644 --- a/manifest.json +++ b/manifest.json @@ -17,7 +17,7 @@ "email": "jean-baptiste@holcroft.fr" }], "requirements": { - "yunohost": ">= 4.0" + "yunohost": ">= 4.0.0" }, "multi_instance": true, "services": [ diff --git a/scripts/install b/scripts/install index 66a3806..38d8193 100644 --- a/scripts/install +++ b/scripts/install @@ -238,11 +238,12 @@ ynh_add_fail2ban_config --logpath="/var/log/nginx/$domain-access.log" --failrege #================================================= ynh_script_progression --message="Configuring SSOwat..." -# Make app public if necessary -if [ "$is_public" -eq 1 ] +# Make app public if necessary or protect it +if [ $is_public -eq 1 ] then - # makes sure no SSO credentials to be passed - ynh_app_setting_set --app="$app" --key=skipped_uris --value="/" + # Everyone can access the app. + # The "main" permission is automatically created before the install script. + ynh_permission_update --permission "main" --add "visitors" fi #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 890fe04..ba53da0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -254,18 +254,6 @@ yunohost service add "$app-server" --log="/var/log/$app/server.log" yunohost service add "$app-worker" --log="/var/log/$app/worker.log" yunohost service add "$app-beat" --log="/var/log/$app/beat.log" -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Upgrading SSOwat configuration..." - -# Make app public if necessary -if [ "$is_public" -eq 1 ] -then - # makes sure no SSO credentials to be passed - ynh_app_setting_set --app="$app" --key=skipped_uris --value="/" -fi - #================================================= # START SYSTEMD SERVICE #=================================================