Module: Gitlab::UserAccess

Defined in:
lib/gitlab/user_access.rb

Class Method Summary collapse

Class Method Details

.allowed?(user) ⇒ Boolean

Returns:

  • (Boolean)

3
4
5
6
7
8
9
10
11
# File 'lib/gitlab/user_access.rb', line 3

def self.allowed?(user)
  return false if user.blocked?

  if user.requires_ldap_check? && user.try_obtain_ldap_lease
    return false unless Gitlab::LDAP::Access.allowed?(user)
  end

  true
end