API Support for Group Deletion Protection Settings

Currently, there is no API support for updating a group's "Deletion protection" settings, and this can only be managed through the UI.

Documentation: https://docs.gitlab.com/ee/user/group/manage.html#enable-delayed-project-deletion

Screen_Shot_2022-08-22_at_11.00.28_AM

We already have API support for updating instance-level project and group delayed deletion settings via the Application settings API on self-managed instances. We should extend this capability for the group settings as well, which would benefit GitLab SaaS customers as well as the GitLab QA team's test data management efforts.

Proposal

Support the option to update a group's "Deletion protection" settings via API

  • Please add this feature behind a feature flag
  • Add the following parameters to PUT /groups/:id:
    • immediately_delete_projects
      • Accepts a boolean. When set to true, will allow immediate deletion for the group's projects by default, and when set to false, will follow the instance-level delayed deletion setting.
    • enforce_subgroup_deletion_protection
      • Accepts a boolean. When set to true, will prevent subgroups from changing the deletion protection settings inherited from the parent group.
  • Request should fail if user is not an Owner or Administrator
Edited Aug 22, 2022 by Valerie Burton
Assignee Loading
Time tracking Loading