Skip to content

Don't try to load omniauth if not enabled

Lin Jen-Shin requested to merge 6591-dont-load-omniauth-if-not-enabled into master

What does this MR do?

Don't try to load omniauth if not enabled

Are there points in the code the reviewer needs to double check?

This is fixing a regression caused by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/19286 which only sets up omniauth if enabled.

Previously, those autoload don't care about Gitlab.config.omniauth.enabled, so they used to work and load those regardless if we're using them or not.

Now, guard everything under Gitlab.config.omniauth.enabled so we don't try to load anything we don't want to enable.

Why was this MR needed?

See https://gitlab.com/gitlab-org/gitlab-ee/issues/6591

Does this MR meet the acceptance criteria?

  • Changelog entry added, if necessary
  • Tests added for this feature/bug
  • Conform by the code review guidelines
    • Has been reviewed by a Backend maintainer
  • End-to-end tests pass (package-and-qa manual pipeline job)

What are the relevant issue numbers?

Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/6591

Edited by Lin Jen-Shin

Merge request reports

Loading