diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-07-03 18:46:23 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-07-03 18:46:23 +0300 |
commit | f3e95aae7abb68f86fc614d70d0ec4b9683b7bfb (patch) | |
tree | 8df1a102872fda5e4d9f651e5482f397ab92ca50 /app/controllers/projects | |
parent | f30089075fabfbac45c6382c0a2717bbb682734e (diff) | |
parent | acc6e3a0fdb8f710d77b8faa2a39823f7e1c7e5d (diff) |
Merge branch 'master' into 'web-hooks-log-pagination'
# Conflicts:
# db/schema.rb
Diffstat (limited to 'app/controllers/projects')
-rw-r--r-- | app/controllers/projects/lfs_api_controller.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/projects/lfs_api_controller.rb b/app/controllers/projects/lfs_api_controller.rb index ee4ed674110..3f4962b543d 100644 --- a/app/controllers/projects/lfs_api_controller.rb +++ b/app/controllers/projects/lfs_api_controller.rb @@ -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 @@ -105,6 +105,11 @@ class Projects::LfsApiController < Projects::GitHttpClientController 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.') end |