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
d5f3ebc3
Commit
d5f3ebc3
authored
Feb 23, 2020
by
GitLab Bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add latest changes from gitlab-org/gitlab@master
parent
9c71f76e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
lib/gitlab/rate_limit_helpers.rb
lib/gitlab/rate_limit_helpers.rb
+1
-1
spec/lib/gitlab/rate_limit_helpers_spec.rb
spec/lib/gitlab/rate_limit_helpers_spec.rb
+1
-0
No files found.
lib/gitlab/rate_limit_helpers.rb
View file @
d5f3ebc3
...
@@ -11,7 +11,7 @@ module Gitlab
...
@@ -11,7 +11,7 @@ module Gitlab
key
=
ARCHIVE_RATE_THROTTLE_KEY
key
=
ARCHIVE_RATE_THROTTLE_KEY
if
rate_limiter
.
throttled?
(
key
,
scope:
[
project
],
threshold:
archive_rate_threshold_by_user
(
user
))
if
rate_limiter
.
throttled?
(
key
,
scope:
[
project
,
user
],
threshold:
archive_rate_threshold_by_user
(
user
))
rate_limiter
.
log_request
(
request
,
"
#{
key
}
_request_limit"
.
to_sym
,
user
)
rate_limiter
.
log_request
(
request
,
"
#{
key
}
_request_limit"
.
to_sym
,
user
)
return
true
return
true
...
...
spec/lib/gitlab/rate_limit_helpers_spec.rb
View file @
d5f3ebc3
...
@@ -43,6 +43,7 @@ describe Gitlab::RateLimitHelpers, :clean_gitlab_redis_shared_state do
...
@@ -43,6 +43,7 @@ describe Gitlab::RateLimitHelpers, :clean_gitlab_redis_shared_state do
end
end
expect
(
class_instance
.
archive_rate_limit_reached?
(
nil
,
project
)).
to
be_truthy
expect
(
class_instance
.
archive_rate_limit_reached?
(
nil
,
project
)).
to
be_truthy
expect
(
class_instance
.
archive_rate_limit_reached?
(
user
,
project
)).
to
be_falsey
end
end
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