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
362b09e7
Commit
362b09e7
authored
May 14, 2020
by
Gilang Gumilar
Committed by
Ash McKenzie
May 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove registrations_recaptcha feature flag
parent
ab2b2108
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
13 deletions
+5
-13
app/controllers/registrations_controller.rb
app/controllers/registrations_controller.rb
+0
-1
changelogs/unreleased/214382-remove-registrations_recaptcha-feature-flag.yml
...ed/214382-remove-registrations_recaptcha-feature-flag.yml
+5
-0
spec/controllers/registrations_controller_spec.rb
spec/controllers/registrations_controller_spec.rb
+0
-12
No files found.
app/controllers/registrations_controller.rb
View file @
362b09e7
...
...
@@ -137,7 +137,6 @@ class RegistrationsController < Devise::RegistrationsController
def
check_captcha
ensure_correct_params!
return
unless
Feature
.
enabled?
(
:registrations_recaptcha
,
default_enabled:
true
)
# reCAPTCHA on the UI will still display however
return
unless
show_recaptcha_sign_up?
return
unless
Gitlab
::
Recaptcha
.
load_configurations!
...
...
changelogs/unreleased/214382-remove-registrations_recaptcha-feature-flag.yml
0 → 100644
View file @
362b09e7
---
title
:
Remove registrations_recaptcha feature flag.
merge_request
:
31797
author
:
Gilang Gumilar
type
:
removed
spec/controllers/registrations_controller_spec.rb
View file @
362b09e7
...
...
@@ -144,16 +144,6 @@ describe RegistrationsController do
expect
(
flash
[
:notice
]).
to
eq
(
I18n
.
t
(
'devise.registrations.signed_up'
))
end
it
'does not require reCAPTCHA if disabled by feature flag'
do
stub_feature_flags
(
registrations_recaptcha:
false
)
post
(
:create
,
params:
user_params
)
expect
(
controller
).
not_to
receive
(
:verify_recaptcha
)
expect
(
flash
[
:alert
]).
to
be_nil
expect
(
flash
[
:notice
]).
to
eq
(
I18n
.
t
(
'devise.registrations.signed_up'
))
end
end
context
'when invisible captcha is enabled'
do
...
...
@@ -294,8 +284,6 @@ describe RegistrationsController do
end
it
"logs a 'User Created' message"
do
stub_feature_flags
(
registrations_recaptcha:
false
)
expect
(
Gitlab
::
AppLogger
).
to
receive
(
:info
).
with
(
/\AUser Created: username=new_username email=new@user.com.+\z/
).
and_call_original
post
(
:create
,
params:
user_params
)
...
...
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