From b2b458d3e0ccb50b48070cd46196c8f2d0dcc229 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Mon, 15 Mar 2021 00:25:46 +0100 Subject: [PATCH] [autopatch] Autopatch to migrate to new permission system --- scripts/install | 4 ++-- scripts/upgrade | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 4cf1c6c..4b15f9e 100755 --- a/scripts/install +++ b/scripts/install @@ -172,8 +172,8 @@ yunohost service add $app.target \ #================================================= # SETUP SSOWAT #================================================= -# unprotected_uris allows SSO credentials to be passed anyway. -ynh_app_setting_set $app unprotected_uris "/" + + #================================================= # CREATE AN ADMIN diff --git a/scripts/upgrade b/scripts/upgrade index ed8f224..cddcf5a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -27,6 +27,16 @@ ynh_clean_setup() { } 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 upgrade type #=================================================