Copilot commented on code in PR #13152:
URL: https://github.com/apache/cloudstack/pull/13152#discussion_r3231922453
##########
ui/src/store/modules/user.js:
##########
@@ -422,8 +422,7 @@ const user = {
api('listLdapConfigurations').then(response => {
const ldapEnable = (response.ldapconfigurationresponse.count > 0)
commit('SET_LDAP', ldapEnable)
- }).catch(error => {
- reject(error)
+ }).catch(ignored => {
Review Comment:
The new `listLdapConfigurations` error handling swallows all failures and
leaves `state.isLdapEnabled` unchanged. In this flow `Login` initializes LDAP
via `commit('SET_LDAP', {})`, so if `listLdapConfigurations` is
forbidden/failed the getter can remain a truthy non-boolean value and
incorrectly enable LDAP-only UI/actions. Consider explicitly setting `SET_LDAP`
to `false` when the call is not permitted (e.g., 401/403 or CloudStack
permission errorcode), while still surfacing/logging unexpected failures
(network/5xx) so real misconfigurations aren’t silently hidden.
--
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]