From 1df16b97529aa3f0b0f0e2b86c11818e86af32cc Mon Sep 17 00:00:00 2001
From: Eugie Limpin <elimpin@gitlab.com>
Date: Tue, 20 Feb 2024 12:35:43 +0000
Subject: [PATCH] Remove arkose_labs_trial_signup_challenge feature flag

Changelog: other
EE: true
---
 .../arkose_labs_trial_signup_challenge.yml      |  8 --------
 doc/development/identity_verification.md        |  1 -
 .../trial_registrations_controller.rb           |  5 -----
 .../features/trial_registrations/signup_spec.rb | 17 +++++------------
 4 files changed, 5 insertions(+), 26 deletions(-)
 delete mode 100644 config/feature_flags/development/arkose_labs_trial_signup_challenge.yml

diff --git a/config/feature_flags/development/arkose_labs_trial_signup_challenge.yml b/config/feature_flags/development/arkose_labs_trial_signup_challenge.yml
deleted file mode 100644
index c24a6994045b0..0000000000000
--- a/config/feature_flags/development/arkose_labs_trial_signup_challenge.yml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-name: arkose_labs_trial_signup_challenge
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/113985
-rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/395754
-milestone: '15.10'
-type: development
-group: group::anti-abuse
-default_enabled: false
diff --git a/doc/development/identity_verification.md b/doc/development/identity_verification.md
index a46fa051d5494..7c4aceade908e 100644
--- a/doc/development/identity_verification.md
+++ b/doc/development/identity_verification.md
@@ -20,7 +20,6 @@ Before you enable these features, ensure [hard email confirmation](../security/u
 | `identity_verification_phone_number` | Turns on phone verification for medium risk users for all flows (the Arkose challenge flag for the specific flow and the `identity_verification` flag must be enabled for this to have effect) |
 | `identity_verification_credit_card` | Turns on credit card verification for high risk users for all flows (the Arkose challenge flag for the specific flow and the `identity_verification` flag must be enabled for this to have effect) |
 | `arkose_labs_signup_challenge` | Enables Arkose challenge for all flows, except the Trial and OAuth flows |
-| `arkose_labs_trial_signup_challenge` | Enables Arkose challenge for the Trial flow (the `arkose_labs_signup_challenge` flag must be enabled as well for this to have effect) |
 | `arkose_labs_oauth_signup_challenge` | Enables Arkose challenge for the OAuth flow |
 
 ## Logging
diff --git a/ee/app/controllers/trial_registrations_controller.rb b/ee/app/controllers/trial_registrations_controller.rb
index 75166c20fec4b..5acb6ee9890ba 100644
--- a/ee/app/controllers/trial_registrations_controller.rb
+++ b/ee/app/controllers/trial_registrations_controller.rb
@@ -47,11 +47,6 @@ def sign_up_params_attributes
   def resource
     @resource ||= Users::AuthorizedBuildService.new(current_user, sign_up_params).execute
   end
-
-  override :arkose_labs_enabled?
-  def arkose_labs_enabled?
-    super && Feature.enabled?(:arkose_labs_trial_signup_challenge)
-  end
 end
 
 TrialRegistrationsController.prepend_mod
diff --git a/ee/spec/features/trial_registrations/signup_spec.rb b/ee/spec/features/trial_registrations/signup_spec.rb
index 4dc4b4a82e15c..ef2b7ee531151 100644
--- a/ee/spec/features/trial_registrations/signup_spec.rb
+++ b/ee/spec/features/trial_registrations/signup_spec.rb
@@ -5,7 +5,6 @@
 RSpec.describe 'Trial Sign Up', :saas, feature_category: :purchase do
   before do
     stub_application_setting(require_admin_approval_after_user_signup: false)
-    stub_feature_flags(arkose_labs_trial_signup_challenge: false)
   end
 
   let_it_be(:new_user) { build_stubbed(:user) }
@@ -30,17 +29,11 @@
       end
     end
 
-    context 'when ArkoseLabs is enabled for trial signups', :js do
-      before do
-        stub_feature_flags(arkose_labs_trial_signup_challenge: true)
-      end
-
-      it_behaves_like 'creates a user with ArkoseLabs risk band' do
-        let(:signup_path) { new_trial_registration_path }
-        let(:user_email) { new_user.email }
-        let(:fill_and_submit_signup_form) do
-          fill_in_sign_up_form(new_user, 'Continue')
-        end
+    it_behaves_like 'creates a user with ArkoseLabs risk band' do
+      let(:signup_path) { new_trial_registration_path }
+      let(:user_email) { new_user.email }
+      let(:fill_and_submit_signup_form) do
+        fill_in_sign_up_form(new_user, 'Continue')
       end
     end
 
-- 
GitLab