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 #=================================================