Fix LDAP backwards compatibility
What does this MR do?
Fixes LDAP backwards compatibility in EE:
- When config contains
method
key but noencryption
key - When config encryption value is
ssl
ortls
- When config does not contain
verify_certificates
key
Why was this MR needed?
A merge conflict seems to have been resolved incorrectly at least once. As a result, the server
variable was redefined inside the loop, and assigned to the hash value at the end. But after some backwards-compatibility code was added, the assignment was placed or moved before the end of the loop, effectively skipping the backwards-compatibility code.
However, the server
variable does not need to be redefined in the loop at all. This is the case in CE, and explains why backwards compatibility was only broken in EE.
Edit: Removing these lines breaks the ability to use this portion of the settings as an object rather than a Hash. It appears these lines are needed in EE, and just happened to not break CE. Will add the lines in CE as well.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts withmaster
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36432 Fixes https://gitlab.com/gitlab-org/gitlab-ee/issues/3082