Attempt to simplify permission migration

This commit is contained in:
Alexandre Aubin 2020-03-30 20:09:26 +02:00 committed by Alexandre Aubin
parent 5aa2556306
commit 5b0269622a

View file

@ -197,7 +197,7 @@ EOF
if [[ "$1" == "set" ]] && [[ "${4:-}" == "/" ]]
then
ynh_permission_update --permission "main" --add "visitors"
elif [[ "$1" == "delete" ]] && [[ "${current_value:-}" == "/" ]]
elif [[ "$1" == "delete" ]] && [[ "${current_value:-}" == "/" ]] && [[ -n "$(ynh_app_setting_get --app=$2 --key='is_public' )" ]]
then
ynh_permission_update --permission "main" --remove "visitors"
fi