fix(user_ldap): Do not block access to configuration page upon bad configuration
- Resolve #43524
Summary
It should be possible to access configuration page with the local admin user even when LDAP configuration is not valid. This prevent ldap backend from throwing in countUsers to allow this.
Checklist
- Code is properly formatted
- Sign-off message is added to all commits
- [x] Tests (unit, integration, api and/or acceptance) are included
- [x] Screenshots before/after for front-end changes
- [x] Documentation (manuals or wiki) has been updated or is not required
- [x] Backports requested where applicable (ex: critical bugfixes)
/backport to stable28
/backport to stable27
/backport to stable26
Well the method was not documented to throw anything, but is documented to return false if an error happens.
I am not sure the throw tag was set consistently back then.
@blizzz Is it a strong no on this one? Do you have another approach which would allow the admin to fix his configuration through GUI?
It is not a strong no, but it would cause me stomachaches. Unfortunately without looking into the matter I have no better idea at the moment either, and it is unlikely to change in the near future. That said a pragmatic approach is to go ahead with this solution, but opening an issue to have an improvement in mind at least. And add some comments into the code to clearly state the intention and meaning of the change, for by looking at it you would not have the slightest idea about it's actual purpose.