1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dotclear2_ynh.git synced 2024-09-03 18:26:29 +02:00

Fix upgrade migration

This commit is contained in:
Kay0u 2020-04-17 16:21:07 +02:00
parent 7bef65fa6a
commit 8ffa11c5b6
No known key found for this signature in database
GPG key ID: AE1DCADB6415A156

View file

@ -52,19 +52,16 @@ fi
is_public=$(ynh_app_setting_get --app=$app --key=is_public) is_public=$(ynh_app_setting_get --app=$app --key=is_public)
if [ -n "$is_public" ]; then 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 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 # 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 if ynh_permission_has_user --permission=main --user=visitors
then 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" ynh_permission_update --permission "main" --add "visitors"
else else
ynh_app_setting_delete --app=$app --key=skipped_uris ynh_app_setting_delete --app=$app --key=unprotected_uris
fi fi
ynh_app_setting_delete --app=$app --key=is_public ynh_app_setting_delete --app=$app --key=is_public
fi fi