Skip to content

Commit 9543915

Browse files
committed
Allow account delete for all account states
1 parent 5214b8c commit 9543915

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -850,10 +850,6 @@ protected boolean lockAccount(long accountId) {
850850
public boolean deleteAccount(AccountVO account, long callerUserId, Account caller) {
851851
long accountId = account.getId();
852852

853-
if (account.getState() != State.DISABLED) {
854-
throw new CloudRuntimeException("Account must be disabled before it can be deleted.");
855-
}
856-
857853
// delete the account record
858854
if (!_accountDao.remove(accountId)) {
859855
logger.error("Unable to delete account " + accountId);

0 commit comments

Comments
 (0)