OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
allow changing of direct login provider at runtime
Markus Kahl5788a2473744
diff --git a/app/helpers/omniauth_helper.rb b/app/helpers/omniauth_helper.rbindex b8507f9b858..26428f7d9d7 100644--- a/app/helpers/omniauth_helper.rb+++ b/app/helpers/omniauth_helper.rb@@ -42,6 +42,6 @@ module OmniauthHelper# If this option is active /login will lead directly to the configured omniauth provider# and so will a click on 'Sign in' (as opposed to opening the drop down menu).def direct_login_provider- OpenProject::Configuration["omniauth_direct_login_provider"]+ Setting.omniauth_direct_login_providerendenddiff --git a/spec/support/shared/with_config.rb b/spec/support/shared/with_config.rbindex 19a8669bed9..ceaee33d8c6 100644--- a/spec/support/shared/with_config.rb+++ b/spec/support/shared/with_config.rb@@ -70,6 +70,11 @@ class WithConfig.to receive(:[]).with(key.to_sym).and_return(value)++ # if a configuration value was set then it automatically pins+ # the respective setting as well which is why we stub this here too+ allow(Setting).to receive(:[]).with(key.to_s).and_return(value)+ allow(Setting).to receive(:[]).with(key.to_sym).and_return(value)enddef aggregate_mocked_configuration(example, config)@@ -90,6 +95,7 @@ class WithConfigreturn if @call_original_implementation_doneallow(OpenProject::Configuration).to receive(:[]).and_call_original+ allow(Setting).to receive(:[]).and_call_original@call_original_implementation_done = trueendend