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
4203a8b3
Commit
4203a8b3
authored
Jun 13, 2018
by
Ash McKenzie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move check logic into #batch_operation_disallowed?
parent
26bea578
Changes
1
Hide 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 @
4203a8b3
...
...
@@ -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.'
)
...
...
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