summaryrefslogtreecommitdiff
path: root/lib/gitlab/auth/ldap/access.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/auth/ldap/access.rb')
-rw-r--r--lib/gitlab/auth/ldap/access.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/gitlab/auth/ldap/access.rb b/lib/gitlab/auth/ldap/access.rb
index 940b802be7e..98eec0e4a7b 100644
--- a/lib/gitlab/auth/ldap/access.rb
+++ b/lib/gitlab/auth/ldap/access.rb
@@ -6,14 +6,14 @@
#
module Gitlab
module Auth
- module LDAP
+ module Ldap
class Access
- prepend_if_ee('::EE::Gitlab::Auth::LDAP::Access') # rubocop: disable Cop/InjectEnterpriseEditionModule
+ prepend_if_ee('::EE::Gitlab::Auth::Ldap::Access') # rubocop: disable Cop/InjectEnterpriseEditionModule
attr_reader :provider, :user, :ldap_identity
def self.open(user, &block)
- Gitlab::Auth::LDAP::Adapter.open(user.ldap_identity.provider) do |adapter|
+ Gitlab::Auth::Ldap::Adapter.open(user.ldap_identity.provider) do |adapter|
block.call(self.new(user, adapter))
end
end
@@ -50,7 +50,7 @@ module Gitlab
end
# Block user in GitLab if they were blocked in AD
- if Gitlab::Auth::LDAP::Person.disabled_via_active_directory?(ldap_identity.extern_uid, adapter)
+ if Gitlab::Auth::Ldap::Person.disabled_via_active_directory?(ldap_identity.extern_uid, adapter)
block_user(user, 'is disabled in Active Directory')
false
else
@@ -62,7 +62,7 @@ module Gitlab
block_user(user, 'does not exist anymore')
false
end
- rescue LDAPConnectionError
+ rescue LdapConnectionError
false
end
@@ -73,11 +73,11 @@ module Gitlab
private
def adapter
- @adapter ||= Gitlab::Auth::LDAP::Adapter.new(provider)
+ @adapter ||= Gitlab::Auth::Ldap::Adapter.new(provider)
end
def ldap_config
- Gitlab::Auth::LDAP::Config.new(provider)
+ Gitlab::Auth::Ldap::Config.new(provider)
end
def ldap_user
@@ -87,7 +87,7 @@ module Gitlab
end
def find_ldap_user
- Gitlab::Auth::LDAP::Person.find_by_dn(ldap_identity.extern_uid, adapter)
+ Gitlab::Auth::Ldap::Person.find_by_dn(ldap_identity.extern_uid, adapter)
end
def block_user(user, reason)