Skip to content

Show account verification warning for concurrent pipelines

What does this MR do and why?

For unconfirmed accounts (accounts that did not perform either e-mail, phone, or credit card verification), we are adding restrictions so that only one pipeline from that account can be run at the same time. This MR adds a warning alert to the pipelines list page and pipeline details page that informs the user of this restriction, when they are hit by this restriction.

Pipelines list page Pipeline details page
ksnip_20240424-155008 ksnip_20240424-154958

How to set up and validate locally

The backend is not implemented yet, so the variable that controls whether the alert is shown is currently stubbed out. Apply this patch and follow the steps below:

Subject: [PATCH] r
---
Index: ee/app/helpers/ee/projects/pipeline_helper.rb
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/ee/app/helpers/ee/projects/pipeline_helper.rb b/ee/app/helpers/ee/projects/pipeline_helper.rb
--- a/ee/app/helpers/ee/projects/pipeline_helper.rb	(revision 1bf04ce247dac04a8251cce0c62c5322cd332ca6)
+++ b/ee/app/helpers/ee/projects/pipeline_helper.rb	(date 1714009889439)
@@ -28,7 +28,7 @@
       override :js_pipeline_header_data
       def js_pipeline_header_data(project, pipeline)
         super.merge({
-          identity_verification_required: false.to_s,
+          identity_verification_required: true.to_s,
           identity_verification_path: '#'
         })
       end
Index: ee/app/helpers/ee/ci/pipelines_helper.rb
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/ee/app/helpers/ee/ci/pipelines_helper.rb b/ee/app/helpers/ee/ci/pipelines_helper.rb
--- a/ee/app/helpers/ee/ci/pipelines_helper.rb	(revision 1bf04ce247dac04a8251cce0c62c5322cd332ca6)
+++ b/ee/app/helpers/ee/ci/pipelines_helper.rb	(date 1714009882987)
@@ -15,7 +15,7 @@
       override :pipelines_list_data
       def pipelines_list_data(project, list_url)
         super.merge({
-          identity_verification_required: false.to_s,
+          identity_verification_required: true.to_s,
           identity_verification_path: '#'
         })
       end
  1. Go to any project -> Build -> Pipelines to view the pipelines list page. Verify that the alert is shown as in the screenshot.
  2. Click on the pipeline status badge to view the details page for that pipeline. Verify that the alert is shown as in the screenshot.

Related to https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/651

Edited by Daniel Tian

Merge request reports