diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-08-23 12:31:17 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-08-23 12:31:17 +0300 |
commit | fbe82e4cd9f4cda7264bb78eab9c5c55e6311518 (patch) | |
tree | de9444c1762fa43c336f595936878677aef8ce43 /config/initializers/1_settings.rb | |
parent | 64820f9a6c17a348dc771a87618140a5c3c8874d (diff) | |
parent | 101d52b360a6a43f1633c5dd60b78e37bc8c4339 (diff) |
Merge branch 'master' into issue-discussions-refactor
# Conflicts:
# package.json
Diffstat (limited to 'config/initializers/1_settings.rb')
-rw-r--r-- | config/initializers/1_settings.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index 38ade18bdc0..abaabad5d65 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -139,6 +139,8 @@ if Settings.ldap['enabled'] || Rails.env.test? end Settings.ldap['servers'].each do |key, server| + server = Settingslogic.new(server) + server['label'] ||= 'LDAP' server['timeout'] ||= 10.seconds server['block_auto_created_users'] = false if server['block_auto_created_users'].nil? @@ -165,6 +167,8 @@ if Settings.ldap['enabled'] || Rails.env.test? MSG Rails.logger.warn(message) end + + Settings.ldap['servers'][key] = server end end @@ -436,7 +440,9 @@ unless Settings.repositories.storages['default'] Settings.repositories.storages['default']['path'] ||= Settings.gitlab['user_home'] + '/repositories/' end -Settings.repositories.storages.values.each do |storage| +Settings.repositories.storages.each do |key, storage| + storage = Settingslogic.new(storage) + # Expand relative paths storage['path'] = Settings.absolute(storage['path']) # Set failure defaults @@ -450,6 +456,8 @@ Settings.repositories.storages.values.each do |storage| storage['failure_reset_time'] = storage['failure_reset_time'].to_i # We might want to have a timeout shorter than 1 second. storage['storage_timeout'] = storage['storage_timeout'].to_f + + Settings.repositories.storages[key] = storage end # |