From 6dba1bc099e9df03e15764fe790c861ca21cc33b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9my=20Coutable?= <remy@rymai.me>
Date: Tue, 18 Dec 2018 12:53:36 +0100
Subject: [PATCH] Make LfsRequest EE-compatible
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Rémy Coutable <remy@rymai.me>
---
 app/controllers/concerns/lfs_request.rb | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/app/controllers/concerns/lfs_request.rb b/app/controllers/concerns/lfs_request.rb
index 9576eb14fdd..5572c3cee2d 100644
--- a/app/controllers/concerns/lfs_request.rb
+++ b/app/controllers/concerns/lfs_request.rb
@@ -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
-- 
2.30.9