1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hextris_ynh.git synced 2024-09-03 19:16:05 +02:00

Update upgrade

This commit is contained in:
ericgaspar 2021-03-18 19:12:14 +01:00
parent fb6e82b04b
commit e3f8f5b435
No known key found for this signature in database
GPG key ID: 574F281483054D44

View file

@ -37,19 +37,10 @@ if [ -z "$final_path" ]; then
ynh_app_setting_set --app=$app --key=final_path --value=$final_path ynh_app_setting_set --app=$app --key=final_path --value=$final_path
fi fi
# Migrate from legacy permission system # Cleaning legacy permissions
is_public=$(ynh_app_setting_get --app=$app --key=is_public) if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all
if [ -n "$is_public" ]; then
# 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
if ynh_permission_has_user --permission=main --user=visitors
then
ynh_app_setting_delete --app=$app --key=skipped_uris
ynh_permission_update --permission="main" --add="visitors"
else
ynh_app_setting_delete --app=$app --key=skipped_uris
fi
ynh_app_setting_delete --app=$app --key=is_public ynh_app_setting_delete --app=$app --key=is_public
fi fi