1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/grav_ynh.git synced 2024-09-03 19:16:01 +02:00

Permissions in upgrade should be for downward compatibility

This commit is contained in:
tituspijean 2021-04-07 18:40:42 +02:00
parent 63505e06e3
commit 5606ee2b8b

View file

@ -55,6 +55,18 @@ if ynh_legacy_permissions_exists; then
ynh_app_setting_delete --app=$app --key=is_public
fi
# Giving admin permission to the specified used
if ! ynh_permission_exists --permission "admin"
then
ynh_permission_create --permission "admin" --allowed "$admin"
fi
# Creating user permission
if ! ynh_permission_exists --permission "user"
then
ynh_permission_create --permission "user"
fi
# If fpm_footprint doesn't exist, create it
if [ -z "$fpm_footprint" ]; then
fpm_footprint=medium
@ -167,25 +179,6 @@ chmod 640 "$final_path/user/config/plugins/login-ldap.yaml"
echo "* * * * * $app php${YNH_PHP_VERSION} $final_path/bin/grav scheduler 1>> /dev/null 2>&1" > /etc/cron.d/$app
#=================================================
# SETUP PERMISSIONS
#=================================================
ynh_script_progression --message="Configuring permissions..." --weight=1
# Giving admin permission to the specified used
if ! ynh_permission_exists --permission "admin"
then
ynh_permission_create --permission "admin" --allowed "$admin"
else
ynh_permission_update --permission "admin" --add "$admin"
fi
# Creating user permission
if ! ynh_permission_exists --permission "user"
then
ynh_permission_create --permission "user"
fi
#=================================================
# RELOAD NGINX AND PHP-FPM
#=================================================