From 376d5da45d5688ebfdb769f285ccd45659b7b2b2 Mon Sep 17 00:00:00 2001 From: abhishek Date: Thu, 16 Dec 2010 17:31:36 -0800 Subject: [PATCH] bug 7106: fixing the account updating bug status 7106: resolved fixed --- server/src/com/cloud/user/AccountManagerImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/com/cloud/user/AccountManagerImpl.java b/server/src/com/cloud/user/AccountManagerImpl.java index 789a09fdeb4..4e342e007c4 100755 --- a/server/src/com/cloud/user/AccountManagerImpl.java +++ b/server/src/com/cloud/user/AccountManagerImpl.java @@ -1462,7 +1462,7 @@ public class AccountManagerImpl implements AccountManager, AccountService { //check if the given account name is unique in this domain for updating Account duplicateAcccount = _accountDao.findAccount(newAccountName, domainId); - if(duplicateAcccount != null && duplicateAcccount.getId() != account.getId()){//allow same account to update itself + if(duplicateAcccount != null && duplicateAcccount.getRemoved() == null && duplicateAcccount.getId() != account.getId()){//allow same account to update itself throw new PermissionDeniedException("There already exists an account with the name:"+newAccountName+" in the domain:"+domainId+" with existing account id:"+duplicateAcccount.getId()); }