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 ldap_tls_options to be a setting
Oliver Güntherc9cbc40e67d7
diff --git a/app/models/ldap_auth_source.rb b/app/models/ldap_auth_source.rbindex 27cc5983074..0227a1de034 100644--- a/app/models/ldap_auth_source.rb+++ b/app/models/ldap_auth_source.rb@@ -163,7 +163,7 @@ class LdapAuthSource < AuthSource{method: tls_mode.to_sym,- tls_options: OpenProject::Configuration.ldap_tls_options.with_indifferent_access+ tls_options: Setting.ldap_tls_options.with_indifferent_access}enddiff --git a/config/constants/settings/definitions.rb b/config/constants/settings/definitions.rbindex cf062ee23ac..4628e36f5a9 100644--- a/config/constants/settings/definitions.rb+++ b/config/constants/settings/definitions.rb@@ -537,8 +537,9 @@ Settings::Definition.define dowritable: falseadd :ldap_tls_options,+ format: :hash,default: {},- writable: false+ writable: trueadd :log_level,default: 'info',diff --git a/spec/models/ldap_auth_source_spec.rb b/spec/models/ldap_auth_source_spec.rbindex 0f624a12e00..4d755bc2b15 100644--- a/spec/models/ldap_auth_source_spec.rb+++ b/spec/models/ldap_auth_source_spec.rb@@ -43,7 +43,7 @@ describe LdapAuthSource, type: :model doenddescribe 'overriding tls_options',- with_config: { ldap_tls_options: { ca_file: '/path/to/ca/file' } } do+ with_settings: { ldap_tls_options: { ca_file: '/path/to/ca/file' } } doit 'sets the encryption options for start_tls' doldap = LdapAuthSource.new tls_mode: :start_tlsexpect(ldap.send(:ldap_encryption)).to eq(method: :start_tls, tls_options: { 'ca_file' => '/path/to/ca/file' })