From 6686f86a50eefabbbaa6b340ec38db79787c227c Mon Sep 17 00:00:00 2001 From: Krakinou Date: Sat, 12 Nov 2022 15:40:37 +0100 Subject: [PATCH] Update Kobo sync permission --- scripts/install | 2 +- scripts/upgrade | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index fb9126f..6be1018 100755 --- a/scripts/install +++ b/scripts/install @@ -240,7 +240,7 @@ if [ $public_library -eq 0 ]; then fi #Kobo sync permission -ynh_permission_create --permission="Kobo sync" --url="$domain/kobo" --allowed="visitors" +ynh_permission_create --permission="Kobo sync" --label="Kobo Sync" --url="re:$domain$path_url\/kobo\/.*$" --allowed="visitors" "all_users" --show_tile="false" --protected="true" #================================================= # RELOAD NGINX diff --git a/scripts/upgrade b/scripts/upgrade index c604e28..d2d8c60 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -139,7 +139,11 @@ if ! ynh_permission_exists --permission="Kobo sync" then # API Authorization with dedicated URL ynh_print_warn --message="This version has now a dedicated Kobo sync authorization, please review group and permission" - ynh_permission_create --permission="Kobo sync" --url="$domain/kobo" --allowed="visitors" + ynh_permission_create --permission="Kobo sync" --label="Kobo Sync" --url="re:$domain$path_url\/kobo\/.*$" --allowed="visitors" "all_users" --show_tile="false" --protected="true" +else + ##TO BE DELETED - error in testing has led to bad permission settings + ynh_permission_delete --permission="Kobo sync" + ynh_permission_create --permission="Kobo sync" --label="Kobo Sync" --url="re:$domain$path_url\/kobo\/.*$" --allowed="visitors" "all_users" --show_tile="false" --protected="true" fi #=================================================