2014-09-02 18:07:02 +05:30
|
|
|
module Gitlab
|
|
|
|
module UserAccess
|
|
|
|
def self.allowed?(user)
|
|
|
|
return false if user.blocked?
|
|
|
|
|
2016-04-02 18:10:28 +05:30
|
|
|
if user.requires_ldap_check? && user.try_obtain_ldap_lease
|
2014-09-02 18:07:02 +05:30
|
|
|
return false unless Gitlab::LDAP::Access.allowed?(user)
|
|
|
|
end
|
|
|
|
|
|
|
|
true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|