kiranchavala commented on PR #13952:
URL: https://github.com/apache/cloudstack/pull/13952#issuecomment-5598588185
@DaanHoogland AI suggestion
```
The chain
The button's only gate is store.isLdapEnabled
(ui/src/config/section/account.js:119-121), and that flag is computed in
ui/src/store/modules/user.js:493-495:
getAPI('listLdapConfigurations').then(response => {
const ldapEnable = (response.ldapconfigurationresponse.count > 0)
commit('SET_LDAP', ldapEnable)
})
Called with no parameters — so no domainid, and listall defaults to false.
That lands in LdapConfigurationDaoImpl.getSearchCriteria() (lines 83-97):
} else if (domainId != null) { // not our case
} else if (listAll) { // not our case
} else {
sc = listGlobalConfigurationsSearch.create(); // ← this one
}
and listGlobalConfigurationsSearch hard-filters on domain_id IS NULL (line
47):
listGlobalConfigurationsSearch.and("domain_id", ...getDomainId(),
SearchCriteria.Op.NULL);
So a configuration linked to a domain has domain_id set, is excluded, count
= 0, isLdapEnabled = false, and the "Add LDAP Account" action is hidden. Note
this is role-independent — it hides the button for root admin too, not just
domain admins.
```
--
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]