Skip to content

Commit 2110f09

Browse files
author
Henrique Sato
committed
removed state for accounts
1 parent 78411fd commit 2110f09

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

api/src/main/java/com/cloud/user/Account.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public interface Account extends ControlledEntity, InternalIdentity, Identity {
3030
* Account states.
3131
* */
3232
enum State {
33-
DISABLED, ENABLED, LOCKED;
33+
DISABLED, ENABLED, LOCKED, REMOVED;
3434

3535
/**
3636
* The toString method was overridden to maintain consistency in the DB, as the GenericDaoBase uses toString in the enum value to make the sql statements

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,9 @@ public boolean deleteAccount(AccountVO account, long callerUserId, Account calle
814814
return false;
815815
}
816816

817+
account.setState(State.REMOVED);
818+
_accountDao.update(accountId, account);
819+
817820
if (s_logger.isDebugEnabled()) {
818821
s_logger.debug("Removed account " + accountId);
819822
}

0 commit comments

Comments
 (0)