gitlab-org--gitlab-foss/app/controllers/concerns/renders_ldap_servers.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
346 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module RendersLdapServers
extend ActiveSupport::Concern
included do
helper_method :ldap_servers
end
def ldap_servers
@ldap_servers ||= begin
if Gitlab::Auth::Ldap::Config.sign_in_enabled?
Gitlab::Auth::Ldap::Config.available_servers
else
[]
end
end
end
end