Make LfsRequest EE-compatible

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Rémy Coutable 2018-12-18 12:53:36 +01:00
parent f9fd9b1def
commit 6dba1bc099
No known key found for this signature in database
GPG Key ID: 98DFFD1C0C62B70B
1 changed files with 6 additions and 0 deletions

View File

@ -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