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:
parent
63505e06e3
commit
5606ee2b8b
1 changed files with 12 additions and 19 deletions
|
@ -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
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue