From b76f9c07970a8a548cfc53d41d63c079dc7cd9eb Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Mon, 15 Mar 2021 00:27:20 +0100 Subject: [PATCH] [autopatch] Autopatch to migrate to new permission system --- scripts/install | 8 ++++---- scripts/upgrade | 10 ++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 93c7f09..db3d745 100755 --- a/scripts/install +++ b/scripts/install @@ -264,14 +264,14 @@ then # Replace radicale by InfCloud into YunoHost portal ynh_app_setting_set $app path ${path_url%/}/infcloud # Protect InfCloud access - ynh_app_setting_set $app protected_uris "/" - domain_regex=$(echo "$domain" | sed 's@-@.@g') + + # Radicale is always accessible (For access to ressources) - ynh_app_setting_set $app skipped_regex "$domain_regex$path_url" + else # If only radicale is installed # Radicale is always accessible (For access to ressources) - ynh_app_setting_set $app unprotected_uris "/" + fi #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index acb5691..6993aab 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -116,6 +116,16 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors +#================================================= +# Migrate legacy permissions to new system +#================================================= +if ynh_legacy_permissions_exists +then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public +fi + #================================================= # CHECK THE PATH #=================================================