diff --git a/scripts/install b/scripts/install index 7be2ea3..9003a7e 100644 --- a/scripts/install +++ b/scripts/install @@ -109,14 +109,15 @@ cp ../conf/app.src /opt/netdata/etc/netdata # SETUP SSOWAT #================================================= -# If app is public, add url to SSOWat conf as skipped_uris +# 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" unprotected_uris "/" + # Everyone can access the app. + # The "main" permission is automatically created before the install script. + ynh_permission_update --permission "main" --add "visitors" fi # Add direct access in the portal to admin only -yunohost app addaccess --users=$admin $app +ynh_permission_update --permission "main" --add "$admin" #================================================= # RELOAD NGINX diff --git a/scripts/upgrade b/scripts/upgrade index bf18c94..bfcd2e2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -115,10 +115,12 @@ cp ../conf/app.src /opt/netdata/etc/netdata #================================================= # SETUP SSOWAT #================================================= -# If app is public, add url to SSOWat conf as skipped_uris + +# Make app public if necessary if [[ $is_public -eq 1 ]]; then - # See install script - ynh_app_setting_set "$app" unprotected_uris "/" + # Everyone can access the app. + # The "main" permission is automatically created before the install script. + ynh_permission_update --permission "main" --add "visitors" fi #=================================================