Commit 4203a8b3 authored by Ash McKenzie's avatar Ash McKenzie

Move check logic into #batch_operation_disallowed?

parent 26bea578
......@@ -93,7 +93,7 @@ class Projects::LfsApiController < Projects::GitHttpClientController
end
def lfs_check_batch_operation!
if upload_request? && Gitlab::Database.read_only?
if batch_operation_disallowed?
render(
json: {
message: lfs_read_only_message
......@@ -104,6 +104,11 @@ class Projects::LfsApiController < Projects::GitHttpClientController
end
end
# Overridden in EE
def batch_operation_disallowed?
upload_request? && Gitlab::Database.read_only?
end
# Overridden in EE
def lfs_read_only_message
_('You cannot write to this read-only GitLab instance.')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment