mirror of
https://github.com/YunoHost-Apps/baikal_ynh.git
synced 2024-09-03 18:16:11 +02:00
commit
a2f791d79c
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
|
ynh_script_progression --message="Configuring SSOwat..." --weight=2
|
||||||
|
|
||||||
# Allow public access on /
|
# 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
|
# 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
|
# RELOAD NGINX
|
||||||
|
|
|
@ -188,10 +188,16 @@ chmod 640 "$final_path/config/baikal.yaml"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring SSOwat..." --weight=2
|
ynh_script_progression --message="Configuring SSOwat..." --weight=2
|
||||||
|
|
||||||
# Allow public access on /
|
# Upgrade from the legacy permissions system
|
||||||
ynh_app_setting_set --app=$app --key=skipped_uris --value="/"
|
protected_uris=$(ynh_app_setting_get --app="$app" --key=protected_uris)
|
||||||
# But restrain on /admin
|
if [ -n "${protected_uris}" ]; then
|
||||||
ynh_app_setting_set --app=$app --key=protected_uris --value="/admin/"
|
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
|
# RELOAD NGINX
|
||||||
|
|
Loading…
Add table
Reference in a new issue