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:
parent
1df5b06cc0
commit
4eeca9f692
2 changed files with 10 additions and 7 deletions
|
@ -109,14 +109,15 @@ cp ../conf/app.src /opt/netdata/etc/netdata
|
||||||
# SETUP SSOWAT
|
# 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
|
if [ $is_public -eq 1 ]; then
|
||||||
# unprotected_uris allows SSO credentials to be passed anyway.
|
# Everyone can access the app.
|
||||||
ynh_app_setting_set "$app" unprotected_uris "/"
|
# The "main" permission is automatically created before the install script.
|
||||||
|
ynh_permission_update --permission "main" --add "visitors"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add direct access in the portal to admin only
|
# Add direct access in the portal to admin only
|
||||||
yunohost app addaccess --users=$admin $app
|
ynh_permission_update --permission "main" --add "$admin"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
|
|
|
@ -115,10 +115,12 @@ cp ../conf/app.src /opt/netdata/etc/netdata
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# 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
|
if [[ $is_public -eq 1 ]]; then
|
||||||
# See install script
|
# Everyone can access the app.
|
||||||
ynh_app_setting_set "$app" unprotected_uris "/"
|
# The "main" permission is automatically created before the install script.
|
||||||
|
ynh_permission_update --permission "main" --add "visitors"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue