Add delete flow for security scan profiles

What does this MR do and why?

Adds a delete action to the group Security Configuration → Manage profiles drawer, behind the custom_secret_detection_profiles_ui feature flag. Custom scan profiles gain a trash icon in the drawer's detail pane; clicking it opens a confirmation modal, and confirming runs securityScanProfileDelete, refetches the profile list, and shows a toast with the deleted profile's name. GitLab-managed profiles show the icon disabled with a tooltip explaining why.

References

Screenshots or screen recordings

Before After

How to set up and validate locally

  1. Enable the feature flag on a Rails console: Feature.enable(:custom_secret_detection_profiles_ui).
  2. Seed at least one Custom Secret Detection scan profile in the target group (via GraphQL securityScanProfileCreate - see !247227 (merged) for setup).
  3. On the group's Security Configuration page, click Manage profiles on the Secret Detection row. The drawer opens with the profile list on the left and a detail pane on the right.
  4. Select the custom profile. The trash icon in the detail header is enabled; hovering reveals the Delete tooltip.
  5. Click it. The modal title reads Delete "<name>", the body reads You are about to delete "<name>". Are you sure you want to proceed?, and the primary action reads Delete profile in the danger variant.
  6. Click Delete profile. The profile disappears from the list, another profile is auto-selected, and a toast reads Deleted "<name>".
  7. Select a GitLab-managed profile (for example, the default). The trash icon is disabled; hovering reveals the tooltip GitLab-managed profiles can't be deleted..
  8. Cancel path: on any custom profile, open the modal and click Cancel or dismiss with the X. The modal closes with no mutation and no toast.
  9. Error path: open the browser's network tab, click Delete icon, and in devtools override the response so securityScanProfileDelete.errors contains a string. Confirm a danger alert appears in the top of the drawer with reading Failed to delete "<name>". message and no success toast is shown.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Chen Charnolevsky

Merge request reports

Loading
Loading