From 8ffa11c5b6d1815017ec9274248c23ded611bb6d Mon Sep 17 00:00:00 2001 From: Kay0u Date: Fri, 17 Apr 2020 16:21:07 +0200 Subject: [PATCH] Fix upgrade migration --- scripts/upgrade | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 7ad7ae7..054a2d2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -52,19 +52,16 @@ fi is_public=$(ynh_app_setting_get --app=$app --key=is_public) if [ -n "$is_public" ]; then - # Remove unprotected_uris - ynh_app_setting_delete --app=$app --key=unprotected_uris - # Remove protected_uris ynh_app_setting_delete --app=$app --key=protected_uris # Removing skipped/unprotected_uris under certain conditions, remove the visitors group added during the migration process of 3.7 - # Remove skipped_uris. If the app was public, add visitors again to the main permission + # Remove unprotected_uris. If the app was public, add visitors again to the main permission if ynh_permission_has_user --permission=main --user=visitors then - ynh_app_setting_delete --app=$app --key=skipped_uris + ynh_app_setting_delete --app=$app --key=unprotected_uris ynh_permission_update --permission "main" --add "visitors" else - ynh_app_setting_delete --app=$app --key=skipped_uris + ynh_app_setting_delete --app=$app --key=unprotected_uris fi ynh_app_setting_delete --app=$app --key=is_public fi