mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-09 20:56:08 +10:00
This changes the number of LDAP calls when users access GitLab via Git-over-SSH or the API. LDAP check results are cached for 1 hour.
14 lines
238 B
Ruby
14 lines
238 B
Ruby
module Gitlab
|
|
module UserAccess
|
|
def self.allowed?(user)
|
|
return false if user.blocked?
|
|
|
|
if user.requires_ldap_check?
|
|
return false unless Gitlab::LDAP::Access.allowed?(user)
|
|
end
|
|
|
|
true
|
|
end
|
|
end
|
|
end
|