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
d282a7a0
Commit
d282a7a0
authored
Dec 22, 2021
by
Magdalena Frankiewicz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature flag rate_limit_profile_update_username
To enable rate limiting of ProfilesController#update_username
parent
5e4cc7eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
app/controllers/profiles_controller.rb
app/controllers/profiles_controller.rb
+1
-1
config/feature_flags/development/rate_limit_profile_update_username.yml
..._flags/development/rate_limit_profile_update_username.yml
+8
-0
No files found.
app/controllers/profiles_controller.rb
View file @
d282a7a0
...
...
@@ -7,7 +7,7 @@ class ProfilesController < Profiles::ApplicationController
before_action
:user
before_action
:authorize_change_username!
,
only: :update_username
before_action
only: :update_username
do
check_rate_limit!
(
:profile_update_username
,
scope:
current_user
)
check_rate_limit!
(
:profile_update_username
,
scope:
current_user
)
if
Feature
.
enabled?
(
:rate_limit_profile_update_username
,
default_enabled: :yaml
)
end
skip_before_action
:require_email
,
only:
[
:show
,
:update
]
before_action
do
...
...
config/feature_flags/development/rate_limit_profile_update_username.yml
0 → 100644
View file @
d282a7a0
---
name
:
rate_limit_profile_update_username
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/77221
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/349132
milestone
:
'
14.7'
type
:
development
group
:
group::optimize
default_enabled
:
false
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