From 5e874f46fceb81f315412f30980a1d57ec2c7ef5 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 23 Aug 2021 23:21:24 +0200 Subject: [PATCH 1/4] fix --- scripts/install | 2 ++ scripts/upgrade | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/scripts/install b/scripts/install index 794adf2..6ed4dff 100755 --- a/scripts/install +++ b/scripts/install @@ -145,6 +145,8 @@ then ynh_permission_update --permission="main" --add="visitors" fi +ynh_app_setting_set --app="$app" --key=skipped_uris --value="/api/,/scripts/api.js" + #================================================= # RELOAD NGINX #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 8c6b256..abcdcd1 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -149,6 +149,13 @@ 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 #================================================= From eaf4f577c994c0eee26e4360466c8297d48f65f5 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 23 Aug 2021 23:33:35 +0200 Subject: [PATCH 2/4] Update install --- scripts/install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index 6ed4dff..6a9ee31 100755 --- a/scripts/install +++ b/scripts/install @@ -147,6 +147,8 @@ 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" + #================================================= # RELOAD NGINX #================================================= From 47ca88ad5ea4d4f8162b8549d9916bb0d43c0575 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 23 Aug 2021 23:53:06 +0200 Subject: [PATCH 3/4] Update upgrade --- scripts/upgrade | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index abcdcd1..1f82d9f 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -131,8 +131,6 @@ then ynh_setup_source --dest_dir="$final_path" --keep="$final_path/data/config.php $final_path/data/users/. $final_path/extensions/." fi - - chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" From ce6a520bbb36277e474db7d4d7ba2c7417cc5508 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 24 Aug 2021 08:01:56 +0200 Subject: [PATCH 4/4] 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 #=================================================