Make LfsRequest EE-compatible
Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
parent
f9fd9b1def
commit
6dba1bc099
|
@ -94,6 +94,7 @@ module LfsRequest
|
|||
def lfs_upload_access?
|
||||
return false unless project.lfs_enabled?
|
||||
return false unless has_authentication_ability?(:push_code)
|
||||
return false if limit_exceeded?
|
||||
|
||||
lfs_deploy_token? || can?(user, :push_code, project)
|
||||
end
|
||||
|
@ -121,4 +122,9 @@ module LfsRequest
|
|||
def has_authentication_ability?(capability)
|
||||
(authentication_abilities || []).include?(capability)
|
||||
end
|
||||
|
||||
# Overriden in EE
|
||||
def limit_exceeded?
|
||||
false
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue