From 580a891b84d9e8fded59bd6af0256d1ec65f4120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Sun, 29 Mar 2020 21:15:03 +0200 Subject: [PATCH] Fix permission migration from gogs --- scripts/experimental_helper.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/experimental_helper.sh b/scripts/experimental_helper.sh index ec89165..23d0e32 100644 --- a/scripts/experimental_helper.sh +++ b/scripts/experimental_helper.sh @@ -237,6 +237,9 @@ ynh_handle_app_migration () { new_label=$(echo $new_app_id | cut -c1 | tr [:lower:] [:upper:])$(echo $new_app_id | cut -c2-) ynh_app_setting_set $new_app label $new_label fi + + yunohost tools shell -c "from yunohost.permission import permission_delete; permission_delete('$old_app.main', force=True, sync_perm=False)" + yunohost tools shell -c "from yunohost.permission import permission_create; permission_create('$new_app.main', url='/' , sync_perm=True)" #================================================= # MOVE FILES TO THE NEW DESTINATION @@ -327,7 +330,6 @@ ynh_handle_app_migration () { app=$new_app - # Set migration_process to 1 to inform that an upgrade has been made migration_process=1 fi