fix bug in user token generation (#16098)

Co-authored-by: Pere Miquel Brull <peremiquelbrull@gmail.com>
This commit is contained in:
Sriharsha Chintalapani 2024-05-17 00:02:54 -07:00 committed by GitHub
parent bd3f47a563
commit affe77fdd5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1282,7 +1282,7 @@ public class UserResource extends EntityResource<User, UserRepository> {
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()