diff options
author | Thibaut Girka <thib@sitedethib.com> | 2019-12-07 12:28:59 +0100 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2019-12-07 12:28:59 +0100 |
commit | abcba5c19885f789557fe1fa62dba7f176d9afe6 (patch) | |
tree | 67628941bd27b7887f92ae758db7d81f34823e62 /config/initializers | |
parent | 7d59e25fbd7a0209c11cbe6aac4400bbca4de82b (diff) | |
parent | 6d7daf6154b1edbfe9a0c0b297baab8cd45658f3 (diff) |
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: - package.json Not really a conflict, caused by an additional dependency in glitch-soc. - yarn.lock Not really a conflict, caused by an additional dependency in glitch-soc.
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/devise.rb | 5 | ||||
-rw-r--r-- | config/initializers/paperclip.rb | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index fa9fd8cc4..59e69ad37 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -53,6 +53,8 @@ module Devise @@ldap_base = nil mattr_accessor :ldap_uid @@ldap_uid = nil + mattr_accessor :ldap_mail + @@ldap_mail = nil mattr_accessor :ldap_bind_dn @@ldap_bind_dn = nil mattr_accessor :ldap_password @@ -369,8 +371,9 @@ Devise.setup do |config| config.ldap_bind_dn = ENV.fetch('LDAP_BIND_DN') config.ldap_password = ENV.fetch('LDAP_PASSWORD') config.ldap_uid = ENV.fetch('LDAP_UID', 'cn') + config.ldap_mail = ENV.fetch('LDAP_MAIL', 'mail') config.ldap_tls_no_verify = ENV['LDAP_TLS_NO_VERIFY'] == 'true' - config.ldap_search_filter = ENV.fetch('LDAP_SEARCH_FILTER', '%{uid}=%{email}') + config.ldap_search_filter = ENV.fetch('LDAP_SEARCH_FILTER', '(|(%{uid}=%{email})(%{mail}=%{email}))') config.ldap_uid_conversion_enabled = ENV['LDAP_UID_CONVERSION_ENABLED'] == 'true' config.ldap_uid_conversion_search = ENV.fetch('LDAP_UID_CONVERSION_SEARCH', '.,- ') config.ldap_uid_conversion_replace = ENV.fetch('LDAP_UID_CONVERSION_REPLACE', '_') diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb index d3602e655..96607b7ce 100644 --- a/config/initializers/paperclip.rb +++ b/config/initializers/paperclip.rb @@ -42,7 +42,7 @@ if ENV['S3_ENABLED'] == 'true' s3_options: { signature_version: ENV.fetch('S3_SIGNATURE_VERSION') { 'v4' }, - http_open_timeout: 5, + http_open_timeout: ENV.fetch('S3_OPEN_TIMEOUT'){ '5' }.to_i, http_read_timeout: 5, http_idle_timeout: 5, retry_limit: 0, |