Skip to content

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

Remove config option

Oliver Günther93dd5524f816
diff --git a/modules/auth_saml/lib/open_project/auth_saml/engine.rb b/modules/auth_saml/lib/open_project/auth_saml/engine.rb
index 0e078672482..1c0ed182539 100644
--- a/modules/auth_saml/lib/open_project/auth_saml/engine.rb
+++ b/modules/auth_saml/lib/open_project/auth_saml/engine.rb
@@ -3,23 +3,11 @@ module OpenProject
module AuthSaml
def self.configuration
RequestStore.fetch(:openproject_omniauth_saml_provider) do
- global_configuration
- .deep_merge(settings_from_db)
+ settings_from_db
.deep_merge(settings_from_providers)
end
end
- def self.reload_configuration!
- @global_configuration = nil
- RequestStore.delete :openproject_omniauth_saml_provider
- end
-
- ##
- # Loads the settings once to avoid accessing the file in each request
- def self.global_configuration
- @global_configuration ||= Hash(settings_from_config || settings_from_yaml).with_indifferent_access
- end
-
def self.settings_from_providers
Saml::Provider
.where(available: true)
@@ -34,22 +22,6 @@ module OpenProject
value.is_a?(Hash) ? value : {}
end
- def self.settings_from_config
- if OpenProject::Configuration["saml"].present?
- Rails.logger.info("[auth_saml] Registering saml integration from configuration.yml")
-
- OpenProject::Configuration["saml"]
- end
- end
-
- def self.settings_from_yaml
- if (settings = Rails.root.join("config/plugins/auth_saml/settings.yml")).exist?
- Rails.logger.info("[auth_saml] Registering saml integration from settings file")
-
- YAML::load(File.open(settings)).symbolize_keys
- end
- end
-
class Engine < ::Rails::Engine
engine_name :openproject_auth_saml