From 5c36ddd62bc7b40edfb77daf90d79447ab3f18d4 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Mon, 15 Mar 2021 00:27:40 +0100 Subject: [PATCH] [autopatch] Autopatch to migrate to new permission system --- scripts/install | 3 ++- scripts/upgrade | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 351f730..16b96df 100644 --- a/scripts/install +++ b/scripts/install @@ -152,8 +152,9 @@ yunohost service add $app --description="News feed reader and aggregator" --log= # SETUP SSOWAT #================================================= ynh_script_progression --message="Configuring SSOwat..." --weight=1 +ynh_permission_update --permission="main" --add="visitors" + -ynh_app_setting_set --app=$app --key=skipped_uris --value="/public.php,/api,/opml.php?op=publish" #================================================= # RELOAD NGINX diff --git a/scripts/upgrade b/scripts/upgrade index 9a01a43..dabfd7d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -60,6 +60,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 + #================================================= # ENSURE DOWNWARD COMPATIBILITY BIS #=================================================