Add more friction to second deletion step in modal

Problem Statement

Users are sometimes accidentally permanently deleting projects and groups, requiring 2-4 days for GitLab support to recover the data. We need to add an additional checkpoint to the permanent deletion flow to prevent accidental data loss.

Implementation Requirements

Scope

  • Add a required checkbox to the second deletion step (permanent deletion modal) for both groups and projects
  • Display on GitLab.com and Dedicated instances only (not self-managed)

UI Changes

Add the following checkbox above the action buttons in the permanent deletion modal:

Checkbox text:

  • This action permanently deletes this [project/group] and all its data. Your administrator cannot restore it. View data export options.

Behavior:

  • Checkbox is unchecked by default
  • "Delete permanently" button remains disabled until checkbox is checked
  • Link to "View data export options" should open export documentation/functionality

See attached designs for visual reference.

Before After - 1st deletion After - 2nd deletion
Project Screenshot 2025-04-24 at 11.12.33.png Delete project 1.png Delete project 3.png
Group Screenshot 2025-05-01 at 16.31.57 1.png Delete group.png Delete group 3.png

Technical Details

  • Detect deployment type (GitLab.com/dedicated vs self-managed) to conditionally show checkbox
  • Update both project and group deletion modals with identical logic
  • Ensure checkbox state properly controls button enable/disable state

Acceptance Criteria

  • Checkbox appears on permanent deletion modal for projects on GitLab.com/Dedicated
  • Checkbox appears on permanent deletion modal for groups on GitLab.com/Dedicated
  • Checkbox does not appear on self-managed instances
  • Delete button is disabled until checkbox is checked
  • Export options link is functional
Edited by Christina Lohr