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
3e90f0c0
Commit
3e90f0c0
authored
Mar 25, 2020
by
Francisco Javier López
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove feature flag snippet_count_check
parent
ca286f20
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
14 deletions
+1
-14
lib/gitlab/git_access_snippet.rb
lib/gitlab/git_access_snippet.rb
+1
-4
spec/lib/gitlab/git_access_snippet_spec.rb
spec/lib/gitlab/git_access_snippet_spec.rb
+0
-10
No files found.
lib/gitlab/git_access_snippet.rb
View file @
3e90f0c0
...
...
@@ -98,10 +98,7 @@ module Gitlab
def
check_single_change_access
(
change
)
Checks
::
SnippetCheck
.
new
(
change
,
logger:
logger
).
validate!
if
Feature
.
enabled?
(
:snippet_count_check
)
Checks
::
PushFileCountCheck
.
new
(
change
,
repository:
repository
,
limit:
Snippet
::
MAX_FILE_COUNT
,
logger:
logger
).
validate!
end
Checks
::
PushFileCountCheck
.
new
(
change
,
repository:
repository
,
limit:
Snippet
::
MAX_FILE_COUNT
,
logger:
logger
).
validate!
rescue
Checks
::
TimedLogger
::
TimeoutError
raise
TimeoutError
,
logger
.
full_message
end
...
...
spec/lib/gitlab/git_access_snippet_spec.rb
View file @
3e90f0c0
...
...
@@ -209,16 +209,6 @@ describe Gitlab::GitAccessSnippet do
expect
{
push_access_check
}.
to
raise_forbidden
(
'foo'
)
end
context
'when feature flag :snippet_count_check is disabled'
do
it
'does not check push file count'
do
stub_feature_flags
(
snippet_count_check:
false
)
expect
(
Gitlab
::
Checks
::
PushFileCountCheck
).
not_to
receive
(
:new
)
expect
{
push_access_check
}.
not_to
raise_error
end
end
end
private
...
...
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