Skip to content

Commit

Permalink
RANGER-4314: Delete nonexistent user return error status code
Browse files Browse the repository at this point in the history
  • Loading branch information
coldestlin authored Jul 13, 2023
1 parent 593d15a commit 67deb82
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2249,10 +2249,10 @@ public synchronized void deleteXUser(Long id, boolean force) {
xaBizUtil.blockAuditorRoleUser();
XXUserDao xXUserDao = daoManager.getXXUser();
XXUser xXUser = xXUserDao.getById(id);
VXUser vXUser = xUserService.populateViewBean(xXUser);
if(vXUser==null || StringUtils.isEmpty(vXUser.getName())){
if(xXUser==null || StringUtils.isEmpty(xXUser.getName())){
throw restErrorUtil.createRESTException("No user found with id=" + id);
}
VXUser vXUser = xUserService.populateViewBean(xXUser);
XXPortalUserDao xXPortalUserDao=daoManager.getXXPortalUser();
XXPortalUser xXPortalUser=xXPortalUserDao.findByLoginId(vXUser.getName().trim());
VXPortalUser vXPortalUser=null;
Expand Down

0 comments on commit 67deb82

Please sign in to comment.