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
91075c82
Commit
91075c82
authored
Nov 21, 2017
by
digitalMoksha
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check for `read_only?` first before seeing if request is disallowed
parent
cba68d33
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
lib/gitlab/middleware/read_only.rb
lib/gitlab/middleware/read_only.rb
+1
-1
No files found.
lib/gitlab/middleware/read_only.rb
View file @
91075c82
...
@@ -14,7 +14,7 @@ module Gitlab
...
@@ -14,7 +14,7 @@ module Gitlab
@env
=
env
@env
=
env
@route_hash
=
nil
@route_hash
=
nil
if
disallowed_request?
&&
Gitlab
::
Database
.
read_only
?
if
Gitlab
::
Database
.
read_only?
&&
disallowed_request
?
Rails
.
logger
.
debug
(
'GitLab ReadOnly: preventing possible non read-only operation'
)
Rails
.
logger
.
debug
(
'GitLab ReadOnly: preventing possible non read-only operation'
)
error_message
=
'You cannot do writing operations on a read-only GitLab instance'
error_message
=
'You cannot do writing operations on a read-only GitLab instance'
...
...
Alain Takoudjou
@alain.takoudjou
mentioned in commit
aeb2f49f
·
Aug 21, 2018
mentioned in commit
aeb2f49f
mentioned in commit aeb2f49fd4c65b9f5e3b2d7858a250a747a0f702
Toggle commit list
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