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
Do not make webauthn a default
Klaus Zandersbc5665a57d20
diff --git a/modules/two_factor_authentication/lib/open_project/two_factor_authentication/token_strategy_manager.rb b/modules/two_factor_authentication/lib/open_project/two_factor_authentication/token_strategy_manager.rbindex 558adf26bcb..e0b979e75f6 100644--- a/modules/two_factor_authentication/lib/open_project/two_factor_authentication/token_strategy_manager.rb+++ b/modules/two_factor_authentication/lib/open_project/two_factor_authentication/token_strategy_manager.rb@@ -113,8 +113,8 @@ module OpenProject::TwoFactorAuthenticationdef merge_with_settings!(config)config['active_strategies'] ||= []- # Always enable webauthn and totp if nothing is enabled- config['active_strategies'] += %i[totp webauthn] if add_default_strategy?(config)+ # Always enable totp if nothing is enabled+ config['active_strategies'] += %i[totp] if add_default_strategy?(config)enddef add_default_strategy?(config)diff --git a/spec/constants/settings/definition_spec.rb b/spec/constants/settings/definition_spec.rbindex e66d4b0fd13..952ce7650ec 100644--- a/spec/constants/settings/definition_spec.rb+++ b/spec/constants/settings/definition_spec.rb@@ -351,7 +351,7 @@ RSpec.describe Settings::Definition, :settings_reset do# override from env manually because these settings are added by plugin itselfdescribed_class.send(:override_value, all[:plugin_openproject_two_factor_authentication])expect(all[:plugin_openproject_two_factor_authentication].value).to eq(- 'active_strategies' => %i[totp webauthn],+ 'active_strategies' => %i[totp],'enforced' => true,'allow_remember_for_days' => 15)@@ -367,7 +367,7 @@ RSpec.describe Settings::Definition, :settings_reset do# override from env manually because these settings are added by plugin itselfdescribed_class.send(:override_value, all[:plugin_openproject_two_factor_authentication])expect(all[:plugin_openproject_two_factor_authentication].value)- .to eq({ 'active_strategies' => %i[totp webauthn], 'enforced' => true, 'allow_remember_for_days' => 15 })+ .to eq({ 'active_strategies' => %i[totp], 'enforced' => true, 'allow_remember_for_days' => 15 })endend