Browse Source

[autopatch] Autopatch to migrate to new permission system

pull/391/head
Yunohost-Bot 5 years ago
committed by Alexandre Aubin
parent
commit
a8a360a9a3
  1. 5
      scripts/install
  2. 10
      scripts/upgrade

5
scripts/install

@ -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/.*"
#=================================================

10
scripts/upgrade

@ -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
#=================================================

Loading…
Cancel
Save