This is an automated email from the ASF dual-hosted git repository.

maheshbandal pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git


The following commit(s) were added to refs/heads/master by this push:
     new 58109859f RANGER-5187: Getting 404 instead of 400 when we try to edit 
user without id
58109859f is described below

commit 58109859ffca91229a78a37e3ffb09cb7bf1aa8d
Author: Mahesh Bandal <maheshban...@apache.org>
AuthorDate: Mon Apr 7 19:54:17 2025 +0530

    RANGER-5187: Getting 404 instead of 400 when we try to edit user without id
---
 security-admin/src/main/java/org/apache/ranger/biz/XUserMgr.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/security-admin/src/main/java/org/apache/ranger/biz/XUserMgr.java 
b/security-admin/src/main/java/org/apache/ranger/biz/XUserMgr.java
index f63818c69..e415924fa 100755
--- a/security-admin/src/main/java/org/apache/ranger/biz/XUserMgr.java
+++ b/security-admin/src/main/java/org/apache/ranger/biz/XUserMgr.java
@@ -1120,7 +1120,7 @@ public VXUser updateXUser(VXUser vXUser) {
         }
 
         Collection<Long> groupIdList  = vXUser.getGroupIdList();
-        VXUser           existing     = 
xUserService.readResource(vXUser.getId());
+        VXUser           existing     = (vXUser.getId() != null) ? 
xUserService.readResource(vXUser.getId()) : null;
         XXPortalUser     xXPortalUser = 
userMgr.updateUserWithPass(vXPortalUser);
 
         //update permissions start

Reply via email to