2014-05-15 04:17:13 -04:00
|
|
|
module Gitlab
|
|
|
|
module UserAccess
|
|
|
|
def self.allowed?(user)
|
|
|
|
return false if user.blocked?
|
|
|
|
|
2016-03-10 06:37:14 -05:00
|
|
|
if user.requires_ldap_check? && user.try_obtain_ldap_lease
|
|
|
|
return false unless Gitlab::LDAP::Access.allowed?(user)
|
2014-05-15 04:17:13 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|