Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f0164abc
Commit
f0164abc
authored
Jun 13, 2018
by
Ash McKenzie
Committed by
Ash McKenzie
Jul 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move check logic into #batch_operation_disallowed?
parent
051ac7d5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
app/controllers/projects/lfs_api_controller.rb
app/controllers/projects/lfs_api_controller.rb
+6
-1
No files found.
app/controllers/projects/lfs_api_controller.rb
View file @
f0164abc
...
...
@@ -98,7 +98,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
...
...
@@ -109,6 +109,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.'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment