We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 732495b commit 0f278c1Copy full SHA for 0f278c1
server/src/main/java/com/cloud/user/AccountManagerImpl.java
@@ -3304,6 +3304,9 @@ public void validateCallingUserHasAccessToDesiredUser(Long userId) {
3304
throw new PermissionDeniedException("Only admins can operate on API keys owned by other users");
3305
}
3306
User desiredUser = _userDao.getUser(userId);
3307
+ if (desiredUser == null) {
3308
+ throw new CloudRuntimeException(String.format("Unable to find user with ID [%s].", userId));
3309
+ }
3310
verifyCallerPrivilegeForUserOrAccountOperations(desiredUser);
3311
3312
0 commit comments