Fix permission migration from gogs

This commit is contained in:
Josué Tille 2020-03-29 21:15:03 +02:00
parent 3f8bc89834
commit 580a891b84
No known key found for this signature in database
GPG Key ID: 716A6C99B04194EF

View File

@ -238,6 +238,9 @@ ynh_handle_app_migration () {
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