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

[autopatch] Autopatch to migrate to new permission system

This commit is contained in:
Yunohost-Bot 2021-03-15 00:27:01 +01:00 committed by Alexandre Aubin
parent 7068d4193b
commit a8a360a9a3
2 changed files with 13 additions and 2 deletions

View file

@ -338,9 +338,10 @@ ynh_add_fail2ban_config --logpath="/home/yunohost.app/$app/data/nextcloud.log" -
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Configuring SSOwat..."
ynh_permission_update --permission="main" --add="visitors"
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
ynh_app_setting_set --app=$app --key=skipped_regex \
--value="$(sed 's/[\.\-]/\%&/g' <<< $domain)/%.well%-known/.*"
#=================================================

View file

@ -102,6 +102,16 @@ fi
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# Migrate legacy permissions to new system
#=================================================
if ynh_legacy_permissions_exists
then
ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public
fi
#=================================================
# UPGRADE DEPENDENCIES
#=================================================