From 493dd02b0b23c8a2238ca3bfd0980ebec5c9cd06 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 19 Nov 2019 17:38:33 +0900 Subject: [PATCH] admin panel allowed for the admin --- scripts/install | 4 +--- scripts/upgrade | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index 0c90aeb..1b303a0 100755 --- a/scripts/install +++ b/scripts/install @@ -171,9 +171,7 @@ if [ $is_public -eq 0 ]; then ynh_permission_update --permission "main" --remove "visitors" --add "all_users" fi -ynh_permission_create --permission "admin" - -ynh_permission_update --permission "admin" --add $admin +ynh_permission_create --permission "admin" --url "/admin" --allowed $admin #================================================= # RELOAD NGINX diff --git a/scripts/upgrade b/scripts/upgrade index 6b3ea9a..27fb5c7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -201,9 +201,9 @@ chown -R $app: $final_path # SETUP SSOWAT #================================================= -if ynh_exec_warn_less ynh_permission_create --permission "admin"; then +if ! ynh_permission_exists --permission "admin"; then ynh_print_info "Upgrading SSOwat configuration..." - ynh_permission_update --permission "admin" --add $admin + ynh_permission_create --permission "admin" --url "/admin" --allowed $admin fi #=================================================