From affe77fdd537fc9b602bada7be417b848da160c7 Mon Sep 17 00:00:00 2001 From: Sriharsha Chintalapani Date: Fri, 17 May 2024 00:02:54 -0700 Subject: [PATCH] fix bug in user token generation (#16098) Co-authored-by: Pere Miquel Brull --- .../org/openmetadata/service/resources/teams/UserResource.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/resources/teams/UserResource.java b/openmetadata-service/src/main/java/org/openmetadata/service/resources/teams/UserResource.java index 6a3b305e558..5120b25ccce 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/resources/teams/UserResource.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/resources/teams/UserResource.java @@ -1282,7 +1282,7 @@ public class UserResource extends EntityResource { User user = repository.getByName( null, userName, getFields("roles,email,isBot"), Include.NON_DELETED, false); - if (Boolean.FALSE.equals(user.getIsBot())) { + if (user.getIsBot() == null || Boolean.FALSE.equals(user.getIsBot())) { // Create Personal Access Token JWTAuthMechanism authMechanism = JWTTokenGenerator.getInstance()