1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/netdata_ynh.git synced 2024-09-03 19:46:33 +02:00

Use new permission system

This commit is contained in:
Jimmy Monin 2020-04-27 23:09:52 +02:00
parent 1df5b06cc0
commit 4eeca9f692
2 changed files with 10 additions and 7 deletions

View file

@ -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

View file

@ -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
#=================================================