2014-05-15 04:17:13 -04:00
|
|
|
module Gitlab
|
|
|
|
module UserAccess
|
|
|
|
def self.allowed?(user)
|
|
|
|
return false if user.blocked?
|
|
|
|
|
2014-07-30 03:51:12 -04:00
|
|
|
if user.requires_ldap_check?
|
|
|
|
return false unless Gitlab::LDAP::Access.allowed?(user)
|
2014-05-15 04:17:13 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|