Commit a5035084 authored by Drew Blessing's avatar Drew Blessing Committed by Drew Blessing

Fix missing setting LDAP servers

If LDAP is disabled in Omnibus, the LDAP `servers` configuration
hash is not present. GitLab relies on this hash being present
even when LDAP is disabled. Now we initialize the hash on
startup.
parent 9ab299f4
---
title: Fix missing setting LDAP servers
merge_request: 52512
author:
type: fixed
......@@ -12,6 +12,7 @@ Settings.encrypted_settings['path'] = Settings.absolute(Settings.encrypted_setti
Settings['ldap'] ||= Settingslogic.new({})
Settings.ldap['enabled'] = false if Settings.ldap['enabled'].nil?
Settings.ldap['servers'] ||= Settingslogic.new({})
Settings.ldap['prevent_ldap_sign_in'] = false if Settings.ldap['prevent_ldap_sign_in'].blank?
Settings.ldap['secret_file'] = Settings.absolute(Settings.ldap['secret_file'] || File.join(Settings.encrypted_settings['path'], "ldap.yaml.enc"))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment