Skip to content

Fix LDAP config `sync_name` problem

What does this MR do and why?

Fixes problem in !110628 (merged) and reported later via OAuth and OmniAuth login stopped working after ... (#392952 - closed), if we didn't enable the LDAP feature, we will meet the error "Missing setting 'sync_name' in 'ldap' section" when login in through OAuth(GitLab/GitHub).

We initialized the config sync_name under the LDAP feature enabled:, but
it can be used in the LDAP feature-disabled scenario:

Screenshots or screen recordings

How to set up and validate locally

  1. Start a GDK environment
  2. Disable the LDAP feature:
    Gitlab.config.ldap.enable = false
  3. Visit the login page and use the OAuth login by or
  4. After the fix, we will never see the error.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

/cc @chaomao @daveliu

Edited by Adil Farrukh

Merge request reports