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
4c6d90ad
Commit
4c6d90ad
authored
Sep 28, 2021
by
Ash McKenzie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New rate_limited_service_issues_create FF
parent
81fc14a0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
app/controllers/projects/issues_controller.rb
app/controllers/projects/issues_controller.rb
+1
-1
config/feature_flags/development/rate_limited_service_issues_create.yml
..._flags/development/rate_limited_service_issues_create.yml
+8
-0
lib/api/issues.rb
lib/api/issues.rb
+1
-1
No files found.
app/controllers/projects/issues_controller.rb
View file @
4c6d90ad
...
...
@@ -37,7 +37,7 @@ class Projects::IssuesController < Projects::ApplicationController
before_action
:authorize_download_code!
,
only:
[
:related_branches
]
# Limit the amount of issues created per minute
before_action
:create_rate_limit
,
only:
[
:create
]
before_action
:create_rate_limit
,
only:
[
:create
]
,
if:
->
{
Feature
.
disabled?
(
'rate_limited_service_issues_create'
,
project
,
default_enabled: :yaml
)
}
before_action
do
push_frontend_feature_flag
(
:tribute_autocomplete
,
@project
)
...
...
config/feature_flags/development/rate_limited_service_issues_create.yml
0 → 100644
View file @
4c6d90ad
---
name
:
rate_limited_service_issues_create
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68526
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/342677
milestone
:
'
14.4'
type
:
development
group
:
group::project management
default_enabled
:
false
lib/api/issues.rb
View file @
4c6d90ad
...
...
@@ -262,7 +262,7 @@ module API
post
':id/issues'
do
Gitlab
::
QueryLimiting
.
disable!
(
'https://gitlab.com/gitlab-org/gitlab/-/issues/21140'
)
check_rate_limit!
:issues_create
,
[
current_user
]
check_rate_limit!
:issues_create
,
[
current_user
]
if
Feature
.
disabled?
(
"rate_limited_service_issues_create"
,
user_project
,
default_enabled: :yaml
)
authorize!
:create_issue
,
user_project
...
...
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