Use LDAP-attributes configured in gitlab.yml in lookup instead of just hard-coded attributes.
What does this MR do?
Use the LDAP-attributes from the config instead of a list of hardcoded attributes.
Are there points in the code the reviewer needs to double check?
The LDAP test cases seem overly broad and likely to give false positives. Adding more attributes makes it worse. However that should probably be addressed as a seperate issue.
Why was this MR needed?
Unable to login for CAS+LDAP-users without the 'mail' ldap-attribute, even if an alternative attribute name was specified in the config file.
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 with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
gitlab-org/gitlab-ce#35311 gitlab-org/gitlab-ce#25849 gitlab-org/gitlab-ce#28362 gitlab-org/gitlab-ee#361
Edited by Casper