2020-05-24 23:13:21 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module RendersLdapServers
|
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
|
|
|
included do
|
|
|
|
helper_method :ldap_servers
|
|
|
|
end
|
|
|
|
|
|
|
|
def ldap_servers
|
2023-03-04 22:38:38 +05:30
|
|
|
@ldap_servers ||= if Gitlab::Auth::Ldap::Config.sign_in_enabled?
|
|
|
|
Gitlab::Auth::Ldap::Config.available_servers
|
|
|
|
else
|
|
|
|
[]
|
|
|
|
end
|
2020-05-24 23:13:21 +05:30
|
|
|
end
|
|
|
|
end
|