Commit 52a840c2 authored by James Fargher's avatar James Fargher

Merge branch '340151-remove-ensure_verified_primary_email_for_2fa-flag' into 'master'

Remove the `ensure_verified_primary_email_for_2fa` feature flag

See merge request gitlab-org/gitlab!71445
parents b4ca6c01 e2600d40
......@@ -231,8 +231,6 @@ class Profiles::TwoFactorAuthsController < Profiles::ApplicationController
end
def ensure_verified_primary_email
return unless Feature.enabled?(:ensure_verified_primary_email_for_2fa, default_enabled: :yaml)
unless current_user.two_factor_enabled? || current_user.primary_email_verified?
redirect_to profile_emails_path, notice: s_('You need to verify your primary email first before enabling Two-Factor Authentication.')
end
......
---
name: ensure_verified_primary_email_for_2fa
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/69593
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/340151
milestone: '14.3'
type: development
group: group::access
default_enabled: true
......@@ -35,7 +35,8 @@ still access your account if you lose your U2F / WebAuthn device.
## Enabling 2FA
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/35102) in GitLab 14.3, account email confirmation required.
> - Account email confirmation requirement [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/35102) in GitLab 14.3. [Deployed behind the `ensure_verified_primary_email_for_2fa` flag](../../../administration/feature_flags.md), enabled by default.
> - Account email confirmation requirement generally available and [feature flag `ensure_verified_primary_email_for_2fa` removed](https://gitlab.com/gitlab-org/gitlab/-/issues/340151) in GitLab 14.4.
There are multiple ways to enable two-factor authentication (2FA):
......@@ -44,11 +45,6 @@ There are multiple ways to enable two-factor authentication (2FA):
In GitLab 14.3 and later, your account email must be confirmed to enable two-factor authentication.
FLAG:
On self-managed GitLab, account email confirmation requirement is enabled. To disable this
restriction, ask an administrator to
[disable the `ensure_verified_primary_email_for_2fa` flag](../../../administration/feature_flags.md).
### One-time password
To enable 2FA:
......
......@@ -27,12 +27,6 @@ RSpec.describe Profiles::TwoFactorAuthsController do
expect(flash[:notice])
.to eq _('You need to verify your primary email first before enabling Two-Factor Authentication.')
end
it 'does not redirect when the `ensure_verified_primary_email_for_2fa` feature flag is disabled' do
stub_feature_flags(ensure_verified_primary_email_for_2fa: false)
expect(response).not_to redirect_to(profile_emails_path)
end
end
shared_examples 'user must enter a valid current password' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment