Skip to content

Commit 56d80af

Browse files
shwstpprCopilot
andauthored
Update server/src/main/java/com/cloud/user/AccountManagerImpl.java
Co-authored-by: Copilot <[email protected]>
1 parent 64bbd0e commit 56d80af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/main/java/com/cloud/user/AccountManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1398,7 +1398,7 @@ public Pair<Long, Account> doInTransaction(TransactionStatus status) {
13981398
- New role should not be of type Admin with domain other than ROOT domain
13991399
*/
14001400
protected void validateRoleChange(Account account, Role role, Account caller) {
1401-
if (account.getRoleId() == role.getId()) {
1401+
if (account.getRoleId() != null && account.getRoleId().equals(role.getId())) {
14021402
return;
14031403
}
14041404
Role currentRole = roleService.findRole(account.getRoleId());

0 commit comments

Comments
 (0)