mirror of
https://github.com/YunoHost-Apps/baikal_ynh.git
synced 2024-09-03 18:16:11 +02:00
Change permissions system. Bump Yunohost required version accordingly.
This commit is contained in:
parent
4c473925c0
commit
e90db69db7
2 changed files with 12 additions and 6 deletions
|
@ -156,9 +156,9 @@ chmod 640 "$final_path/config/baikal.yaml"
|
|||
ynh_script_progression --message="Configuring SSOwat..." --weight=2
|
||||
|
||||
# Allow public access on /
|
||||
ynh_app_setting_set --app=$app --key=skipped_uris --value="/"
|
||||
ynh_permission_update --permission "main" --add "visitors"
|
||||
# But restrain on /admin
|
||||
ynh_app_setting_set --app=$app --key=protected_uris --value="/admin/"
|
||||
ynh_permission_create --permission "admin" --url "/admin" --allowed "all_users"
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
|
|
|
@ -195,10 +195,16 @@ chmod 640 "$final_path/config/baikal.yaml"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Configuring SSOwat..." --weight=2
|
||||
|
||||
# Allow public access on /
|
||||
ynh_app_setting_set --app=$app --key=skipped_uris --value="/"
|
||||
# But restrain on /admin
|
||||
ynh_app_setting_set --app=$app --key=protected_uris --value="/admin/"
|
||||
# Upgrade from the legacy permissions system
|
||||
protected_uris=$(ynh_app_setting_get --app="$app" --key=protected_uris)
|
||||
if [ -n "${protected_uris}" ]; then
|
||||
ynh_app_setting_delete --app="$app" --key=protected_uris
|
||||
|
||||
# Allow public access on /
|
||||
ynh_permission_update --permission "main" --add "visitors"
|
||||
# But restrain on /admin
|
||||
ynh_permission_create --permission "admin" --url "/admin" --allowed "all_users"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
|
|
Loading…
Add table
Reference in a new issue