From ce6a520bbb36277e474db7d4d7ba2c7417cc5508 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 24 Aug 2021 08:01:56 +0200 Subject: [PATCH] fix --- scripts/install | 4 +--- scripts/upgrade | 12 +++++------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/scripts/install b/scripts/install index 6a9ee31..46f2b70 100755 --- a/scripts/install +++ b/scripts/install @@ -145,9 +145,7 @@ then ynh_permission_update --permission="main" --add="visitors" fi -ynh_app_setting_set --app="$app" --key=skipped_uris --value="/api/,/scripts/api.js" - -#ynh_permission_create --permission="api" --url="/api" --additional_urls="/scripts/api.js" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true" +ynh_permission_create --permission="api" --url="/api" --additional_urls="/scripts/api.js" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true" #================================================= # RELOAD NGINX diff --git a/scripts/upgrade b/scripts/upgrade index 1f82d9f..f32ef97 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -64,6 +64,11 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi +# Create a permission if needed +if ! ynh_permission_exists --permission="api"; then + ynh_permission_create --permission="api" --url="/api" --additional_urls="/scripts/api.js" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true" +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -147,13 +152,6 @@ if [ -f /tmp/FreshRSS.log ]; then ynh_secure_remove /tmp/FreshRSS.log fi -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Upgrading SSOwat configuration..." - -ynh_app_setting_set --app="$app" --key=skipped_uris --value="/api/,/scripts/api.js" - #================================================= # GENERIC FINALIZATION #=================================================