1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nextcloud_ynh.git synced 2024-09-03 19:55:57 +02:00

Clean legacy permission

This commit is contained in:
Kay0u 2020-03-27 15:36:03 +01:00
parent 5fb67a99c6
commit 7badbb544a
No known key found for this signature in database
GPG key ID: 7FF262C033518333

View file

@ -27,6 +27,8 @@ user_home=$(ynh_app_setting_get --app=$app --key=user_home)
fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint)
fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage)
unprotected_uris=$(ynh_app_setting_get $app unprotected_uris)
#=================================================
# CHECK VERSION
#=================================================
@ -65,6 +67,13 @@ if [ -z "$fpm_usage" ]; then
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
fi
# Delete unprotected_uris if it exists
if [ ! -z $unprotected_uris ]; then
ynh_app_setting_delete $app unprotected_uris
# Delete unprotected_uris implicitly remove visitors, add it again.
ynh_permission_update --permission "main" --add "visitors"
fi
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================