weizhouapache commented on code in PR #7915:
URL: https://github.com/apache/cloudstack/pull/7915#discussion_r1307311223
##########
server/src/main/java/com/cloud/user/AccountManagerImpl.java:
##########
@@ -1847,6 +1832,29 @@ public boolean deleteUserAccount(long accountId) {
return deleteAccount(account, callerUserId, caller);
}
+ private boolean checkDeleteNeeded(AccountVO account, Account caller) {
Review Comment:
the method name is a bit confused.
if it returns `true`, then cleanup is not needed, right ?
##########
plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/LdapManagerImpl.java:
##########
@@ -125,10 +134,28 @@ public void onPublishMessage(String senderAddress, String
subject, Object args)
}
}
});
-
- return true;
}
+ private void addDomainRemovalListener() {
+ messageBus.subscribe(DomainManager.MESSAGE_REMOVE_DOMAIN_EVENT, new
MessageSubscriber() {
+ @Override
+ public void onPublishMessage(String senderAddress, String subject,
Object args) {
+ try {
+ final Domain domain =
domainDao.findByIdIncludingRemoved((Long) args);
+ long domainId = domain.getId();
+ LdapTrustMapVO ldapTrustMapVO =
_ldapTrustMapDao.findByDomainId(domainId);
Review Comment:
I think the method should be similar as `listByDomainId`, it should return a
list of VOs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]