gitlab-org--gitlab-foss/lib/gitlab/user_access.rb

14 lines
268 B
Ruby
Raw Normal View History

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)
end
true
end
end
end