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
725d921d
Commit
725d921d
authored
Sep 28, 2017
by
Alejandro Rodríguez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds a Gitaly n+1 notice to commit handling on access check
parent
c49ad301
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
lib/gitlab/checks/change_access.rb
lib/gitlab/checks/change_access.rb
+11
-8
No files found.
lib/gitlab/checks/change_access.rb
View file @
725d921d
...
...
@@ -162,14 +162,17 @@ module Gitlab
# if newrev is blank, the branch was deleted
return
if
deletion?
||
!
(
commit_validation
||
validate_path_locks?
)
commits
.
each
do
|
commit
|
if
commit_validation
error
=
check_commit
(
commit
,
push_rule
)
raise
GitAccess
::
UnauthorizedError
,
error
if
error
end
if
error
=
check_commit_diff
(
commit
,
push_rule
)
raise
GitAccess
::
UnauthorizedError
,
error
# n+1: https://gitlab.com/gitlab-org/gitlab-ee/issues/3593
Gitlab
::
GitalyClient
.
allow_n_plus_1_calls
do
commits
.
each
do
|
commit
|
if
commit_validation
error
=
check_commit
(
commit
,
push_rule
)
raise
GitAccess
::
UnauthorizedError
,
error
if
error
end
if
error
=
check_commit_diff
(
commit
,
push_rule
)
raise
GitAccess
::
UnauthorizedError
,
error
end
end
end
end
...
...
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