GitLab Group LDAP user sync UI edgecase
Summary
When configuring LDAP user synchronization for a GitLab group if the "LDAP user filter" text field is set and the sync type is then switched to "LDAP Group cn" and a group is selected when saving the UI returns error Could not create new LDAP link: Filter must be blank, Cn must be blank
or Could not create new LDAP link: Filter must be blank, Filter must be a valid filter, Cn must be blank
.
(Summarize the bug encountered concisely)
Steps to reproduce
- Create a GitLab group on an LDAP enable GitLab instance.
- Navigate to ->Settings->LDAP Synchronization
- Fill in a valid or invalid "LDAP User filter"
- Select the "LDAP Group cn" radio button under "Sync method"
- Select an valid LDAP group using the "LDAP Group cn" search box.
- Click the "Add synchronization" button
- Observe the error message at the top of the page.
Example Project
N/A
What is the current bug behavior?
An error occurs when both the "LDAP User filter" and "LDAP Group cn" fields have been filled out, even though it is only possible to select one "Sync method" radio button.
What is the expected correct behavior?
Only the field for the selected "Sync method" radio button should be submitted to the server when the "Add Synchronization" button is clicked.
Relevant logs and/or screenshots
Unable to provide, system is airgapped.
Output of checks
N/A UI bug
Results of GitLab environment info
Expand for output related to GitLab environment info
gitlab-rake gitlab:env:info System Information System: Proxy: no Current User: git Using RVM: no Ruby Version: 2.5.3p105 Gem Version: 2.7.6 Bundler Version: 1.16.6 Rake Version: 12.3.2 Redis Version: 3.2.12 Git Version: 2.18.1 Sidekiq Version: 5.2.3 Go Version: unknown GitLab information Version: 11.7.0-ee Revision: c02f0d4 Directory: /opt/GitLab/embedded/service/GitLab-rails DB Adapter: PostgreSQL DB Version: 9.6.8 URL: https://gitlab. HTTP Clone URL: https://GitLab./some-group/some-project.git URL: git@:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: yes Using Omniauth: yes Omniauth Providers: saml, kerberos_spnego GitLab Shell Version: 8.4.4 Repository storage paths:
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab subtasks ... Checking GitLab Shell ... GitLab Shell: ... GitLab Shell version >= 8.4.4 ? ... OK (8.4.4) Running /opt/GitLab/embedded/service/GitLab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK Access to /var/opt/gitlab/.ssh/authorized_keys: OK GitLab-shell self-check successful Checking GitLab Shell ... Finished Checking Gitaly ... Gitaly: ... default ... OK Checking Gitaly ... Finished Checking Sidekiq ... Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1 Checking Sidekiq ... Finished Checking Incoming Email ... Incoming Email: ... Reply by email is disabled in config/gitLab.yml Checking Incoming Email ... Finished LDAP: ... Server: ldapmain LDAP authentication... Success Ldap users with access to your GitLab server (only showing the first 100 results) DN: ... Checking LDAP ... Finished Checking GitLab App ... Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writeable? ... yes Tmp directory writeable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-GitLab has no init script> Init script up-to-date? ... skipped (omnibus-GitLab has no init script Projects have namespace: ... 2/2 ... yes 7/3 ... yes 2/4 ... yes 2/5 ... yes 11/11 ... yes 13/12 ... yes 12/13 ... yes Redis version >= 2.8.0 ... yes Ruby version >= 2.3.5 ? ... yes (2.4.5) Git version >= 2.18.0 ? ... yes (2.18.1) Git user has default SSH configuration? ... yes Active users: ... 7 Elasticsearch version 5.6 - 6.x? ... skipped (elasticsearch is disabled) Checking GitLab App ... Finished Checking GitLab subtasks .. Finished