fix legacy permission management

This commit is contained in:
Kay0u 2020-01-16 00:34:11 +07:00
parent c7506fd3a9
commit c163ae2949
No known key found for this signature in database
GPG key ID: 7FF262C033518333

View file

@ -187,9 +187,15 @@ EOF
# Fucking legacy permission management.
# We need this because app temporarily set the app as unprotected to configure it with curl...
if [[ "$3" =~ ^(unprotected|skipped)_ ]] && [[ "${4:-}" == "/" ]]
if [[ "$3" =~ ^(unprotected|skipped)_ ]]
then
if [[ "$1" == "set" ]] && [[ "${4:-}" == "/" ]]
then
ynh_permission_update --permission "main" --add "visitors"
elif [[ "$1" == "delete" ]]
then
ynh_permission_update --permission "main" --remove "visitors"
fi
fi
}