From ec21993fe750907fbbfb1a7ce7304aca70974dc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Tue, 19 Aug 2025 18:11:43 +0200 Subject: [PATCH 1/2] doc: Disallow immediate deletion behind :disallow_immediate_deletion FF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- .../components/form_group.vue | 2 +- doc/administration/geo/replication/faq.md | 2 +- .../visibility_and_access_controls.md | 36 +++---------------- doc/api/groups.md | 3 +- doc/api/projects.md | 3 +- doc/user/group/_index.md | 5 +-- doc/user/project/working_with_projects.md | 1 + .../components/form_group_spec.js | 2 +- 8 files changed, 16 insertions(+), 38 deletions(-) diff --git a/app/assets/javascripts/admin/application_settings/deletion_protection/components/form_group.vue b/app/assets/javascripts/admin/application_settings/deletion_protection/components/form_group.vue index d20cfc309226bf..74ca91a9beea99 100644 --- a/app/assets/javascripts/admin/application_settings/deletion_protection/components/form_group.vue +++ b/app/assets/javascripts/admin/application_settings/deletion_protection/components/form_group.vue @@ -31,7 +31,7 @@ export default { }, i18n: I18N_DELETION_PROTECTION, helpPath: helpPagePath('administration/settings/visibility_and_access_controls', { - anchor: 'delayed-project-deletion', + anchor: 'deletion-protection', }), inputId: 'application_setting_deletion_adjourned_period', computed: { diff --git a/doc/administration/geo/replication/faq.md b/doc/administration/geo/replication/faq.md index a5e7a144295d4d..d4e035edef52f0 100644 --- a/doc/administration/geo/replication/faq.md +++ b/doc/administration/geo/replication/faq.md @@ -94,7 +94,7 @@ Yes, provided they are not excluded through [selective sync](selective_synchroni ## Are delayed deletion projects replicated to secondary sites? -Yes, projects scheduled for deletion by [delayed deletion](../../settings/visibility_and_access_controls.md#delayed-project-deletion), but are yet to be permanently deleted, are replicated to secondary sites. +Yes, projects scheduled for deletion by [delayed deletion](../../settings/visibility_and_access_controls.md#deletion-protection), but are yet to be permanently deleted, are replicated to secondary sites. ## What happens to my secondary sites with when my primary site goes down? diff --git a/doc/administration/settings/visibility_and_access_controls.md b/doc/administration/settings/visibility_and_access_controls.md index 94ff3996495d90..324753d755f0ba 100644 --- a/doc/administration/settings/visibility_and_access_controls.md +++ b/doc/administration/settings/visibility_and_access_controls.md @@ -96,8 +96,10 @@ To disable the restriction: {{< history >}} -- Enabled delayed deletion by default and removed the option to delete immediately [on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/393622) and [on GitLab Self-Managed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/119606) in GitLab 16.0. +- Enabled delayed deletion for projects by default [on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/393622) and [on GitLab Self-Managed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/119606) in GitLab 16.0. +- [Changed to default behavior for groups](https://gitlab.com/gitlab-org/gitlab/-/issues/389557) on the Premium and Ultimate tier in GitLab 16.0. - [Moved](https://gitlab.com/groups/gitlab-org/-/epics/17208) from GitLab Premium to GitLab Free in 18.0. +- Deleting a group or project immediately once it's scheduled for deletion is not allowed anymore in GitLab 18.4 [with a flag](../../administration/feature_flags/_index.md) named `disallow_immediate_deletion`. Disabled by default. {{< /history >}} @@ -106,28 +108,13 @@ These protections help guard against accidental deletion of groups and projects ### Retention period Groups and projects remain restorable during the retention period you define. By default, -this is 7 days, but you can change it. If you set the retention period to `0` days, GitLab -removes deleted groups and projects immediately. You can't restore them. - -The retention period must be between `1` and `90` days. - -### Delayed project deletion - -{{< history >}} - -- Enabled delayed deletion by default and removed the option to delete immediately [on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/393622) and [on GitLab Self-Managed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/119606) in GitLab 16.0. -- [Moved](https://gitlab.com/groups/gitlab-org/-/epics/17208) from GitLab Premium to GitLab Free in 18.0. - -{{< /history >}} +this is 30 days, but you can change it to a value between `1` and `90` days. Prerequisites: - You must be an administrator. -- You must enable delayed project deletion for groups before you can enable it for projects. - Deletion protection is not available for projects only. -- When disabled, GitLab enforces this delayed-deletion setting, and you can't override it. -To configure delayed project deletion: +To configure deletion protection for groups and projects: 1. On the left sidebar, at the bottom, select **Admin**. 1. Select **Settings** > **General**. @@ -135,19 +122,6 @@ To configure delayed project deletion: 1. Scroll to **Deletion protection** and set the retention period to a value between `1` and `90` days. 1. Select **Save changes**. -### Delayed group deletion - -{{< history >}} - -- [Changed to default behavior](https://gitlab.com/gitlab-org/gitlab/-/issues/389557) on the Premium and Ultimate tier in GitLab 16.0. -- [Moved](https://gitlab.com/groups/gitlab-org/-/epics/17208) from GitLab Premium to GitLab Free in 18.0. - -{{< /history >}} - -Groups remain restorable if the retention period is `1` or more days. - -In GitLab 16.0 and later, the **Keep deleted** option is removed, and delayed group deletion is the default. - ### Override defaults and delete immediately To override the delay, and immediately delete a project marked for removal: diff --git a/doc/api/groups.md b/doc/api/groups.md index 041596821676cf..bac4353cbe78fd 100644 --- a/doc/api/groups.md +++ b/doc/api/groups.md @@ -1372,6 +1372,7 @@ curl --request POST --header "PRIVATE-TOKEN: " \ {{< history >}} - Marking groups for deletion [available](https://gitlab.com/groups/gitlab-org/-/epics/17208) on Free tier in GitLab 18.0. +- `permanently_remove` was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/201957) in GitLab 18.4 [with a flag](../administration/feature_flags/_index.md) named `disallow_immediate_deletion`. {{< /history >}} @@ -1394,7 +1395,7 @@ DELETE /groups/:id Parameters: | `id` | integer or string | yes | The ID or [URL-encoded path](rest/_index.md#namespaced-paths) of the group. | -| `permanently_remove` | boolean/string | no | If `true`, immediately deletes a subgroup that is already marked for deletion. Cannot delete top-level groups. | +| `permanently_remove` | boolean/string | no | [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/201957) in GitLab 18.4. If `true`, immediately deletes a subgroup that is already marked for deletion. Cannot delete top-level groups. | | `full_path` | string | no | The full path to the subgroup. Used to confirm deletion of the subgroup. If `permanently_remove` is `true`, this attribute is required. To find the subgroup path, see the [group details](groups.md#get-a-single-group). | The response is `202 Accepted` if the user has authorization. diff --git a/doc/api/projects.md b/doc/api/projects.md index db8e022b4c1bda..6910a86e595bad 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -2163,6 +2163,7 @@ Example response: - Immediately deleting projects was [enabled on GitLab.com and GitLab Self-Managed](https://gitlab.com/gitlab-org/gitlab/-/issues/396500) in GitLab 15.11. - [Marking project for deletion was moved](https://gitlab.com/groups/gitlab-org/-/epics/17208) from GitLab Premium to GitLab Free in 18.0. +- `permanently_remove` was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/201957) in GitLab 18.4 [with a flag](../administration/feature_flags/_index.md) named `disallow_immediate_deletion`. {{< /history >}} @@ -2190,7 +2191,7 @@ Supported attributes: |:---------------------|:------------------|:---------|:------------| | `id` | integer or string | Yes | The ID or [URL-encoded path of the project](rest/_index.md#namespaced-paths). | | `full_path` | string | no | Full path of project to use with `permanently_remove`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/396500) in GitLab 15.11 for Premium and Ultimate only and moved to GitLab Free in 18.0. To find the project path, use `path_with_namespace` from [get single project](projects.md#get-a-single-project). | -| `permanently_remove` | boolean/string | no | Immediately deletes a project if it is marked for deletion. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/396500) in GitLab 15.11 for Premium and Ultimate only and moved to GitLab Free in 18.0. | +| `permanently_remove` | boolean/string | no | [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/201957) in GitLab 18.4. Immediately deletes a project if it is marked for deletion. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/396500) in GitLab 15.11 for Premium and Ultimate only and moved to GitLab Free in 18.0. | ### Restore a project marked for deletion diff --git a/doc/user/group/_index.md b/doc/user/group/_index.md index cda91184baba59..524e6570605218 100644 --- a/doc/user/group/_index.md +++ b/doc/user/group/_index.md @@ -270,7 +270,7 @@ This action adds a background job to mark a group for deletion. On GitLab.com, t you can modify the retention period through the [instance settings](../../administration/settings/visibility_and_access_controls.md#deletion-protection). If the user who scheduled the group deletion loses access to the group (for example, by leaving the group, having their role downgraded, or being banned from the group) before the deletion occurs, -the deletion job will instead restore and unarchive the group, so the group will no longer be scheduled for deletion. +the deletion job will instead restore the group, so the group will no longer be scheduled for deletion. {{< alert type="warning" >}} @@ -299,8 +299,9 @@ Groups that are marked for deletion are labeled **Pending deletion**. {{< history >}} -- Enabled delayed deletion by default and removed the option to delete immediately [on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/393622) and [on GitLab Self-Managed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/119606) in GitLab 16.0. +- Enabled delayed deletion by default [on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/393622) and [on GitLab Self-Managed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/119606) in GitLab 16.0. - [Moved](https://gitlab.com/groups/gitlab-org/-/epics/17208) from GitLab Premium to GitLab Free in 18.0. +- Deleting a group immediately once it's scheduled for deletion is not allowed anymore in GitLab 18.4 [with a flag](../../administration/feature_flags/_index.md) named `disallow_immediate_deletion`. Disabled by default. {{< /history >}} diff --git a/doc/user/project/working_with_projects.md b/doc/user/project/working_with_projects.md index a568927115fb31..5e9ec2e91cfd32 100644 --- a/doc/user/project/working_with_projects.md +++ b/doc/user/project/working_with_projects.md @@ -333,6 +333,7 @@ To upload an avatar in your project settings: - Option to delete projects immediately as a group setting removed [on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/393622) and [on GitLab Self-Managed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/119606) in GitLab 16.0. - Default behavior changed to delayed project deletion for [GitLab Free](https://gitlab.com/groups/gitlab-org/-/epics/17208) and [personal projects](https://gitlab.com/gitlab-org/gitlab/-/issues/536244) in 18.0. - Option to delete projects immediately [moved](https://gitlab.com/groups/gitlab-org/-/epics/17208) from GitLab Premium to GitLab Free in 18.0. +- Deleting a project immediately once it's scheduled for deletion is not allowed anymore in GitLab 18.4 [with a flag](../../administration/feature_flags/_index.md) named `disallow_immediate_deletion`. Disabled by default. {{< /history >}} diff --git a/spec/frontend/admin/application_settings/deletion_protection/components/form_group_spec.js b/spec/frontend/admin/application_settings/deletion_protection/components/form_group_spec.js index 6adfdac5f57eae..18ef0608235cbb 100644 --- a/spec/frontend/admin/application_settings/deletion_protection/components/form_group_spec.js +++ b/spec/frontend/admin/application_settings/deletion_protection/components/form_group_spec.js @@ -48,7 +48,7 @@ describe('Form group component', () => { expect(findGlLink().text()).toContain(I18N_DELETION_PROTECTION.learnMore); expect(findGlLink().attributes('href')).toBe( helpPagePath('administration/settings/visibility_and_access_controls', { - anchor: 'delayed-project-deletion', + anchor: 'deletion-protection', }), ); }); -- GitLab From d1e715a5e5e26122a8569c476029d550c72289ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Wed, 20 Aug 2025 16:06:01 +0200 Subject: [PATCH 2/2] Address feedback from first review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- .../settings/visibility_and_access_controls.md | 11 +++++++++-- doc/user/group/_index.md | 11 +++++++++-- doc/user/project/working_with_projects.md | 9 ++++++++- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/doc/administration/settings/visibility_and_access_controls.md b/doc/administration/settings/visibility_and_access_controls.md index 324753d755f0ba..f3cf4090bf191d 100644 --- a/doc/administration/settings/visibility_and_access_controls.md +++ b/doc/administration/settings/visibility_and_access_controls.md @@ -99,16 +99,23 @@ To disable the restriction: - Enabled delayed deletion for projects by default [on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/393622) and [on GitLab Self-Managed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/119606) in GitLab 16.0. - [Changed to default behavior for groups](https://gitlab.com/gitlab-org/gitlab/-/issues/389557) on the Premium and Ultimate tier in GitLab 16.0. - [Moved](https://gitlab.com/groups/gitlab-org/-/epics/17208) from GitLab Premium to GitLab Free in 18.0. -- Deleting a group or project immediately once it's scheduled for deletion is not allowed anymore in GitLab 18.4 [with a flag](../../administration/feature_flags/_index.md) named `disallow_immediate_deletion`. Disabled by default. +- Support for disallowing immediate deletion for groups or projects scheduled for deletion [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/201957) in GitLab 18.4 [with a flag](../../administration/feature_flags/_index.md) named `disallow_immediate_deletion`. Disabled by default. {{< /history >}} +{{< alert type="flag" >}} + +The availability of this feature is controlled by a feature flag. +For more information, see the history. + +{{< /alert >}} + These protections help guard against accidental deletion of groups and projects on your instance. ### Retention period Groups and projects remain restorable during the retention period you define. By default, -this is 30 days, but you can change it to a value between `1` and `90` days. +the retention period is 30 days, but you can change it to a value between `1` and `90` days. Prerequisites: diff --git a/doc/user/group/_index.md b/doc/user/group/_index.md index 524e6570605218..14190f2104a4f4 100644 --- a/doc/user/group/_index.md +++ b/doc/user/group/_index.md @@ -270,7 +270,7 @@ This action adds a background job to mark a group for deletion. On GitLab.com, t you can modify the retention period through the [instance settings](../../administration/settings/visibility_and_access_controls.md#deletion-protection). If the user who scheduled the group deletion loses access to the group (for example, by leaving the group, having their role downgraded, or being banned from the group) before the deletion occurs, -the deletion job will instead restore the group, so the group will no longer be scheduled for deletion. +the deletion job instead restores the group, and the group is no longer scheduled for deletion. {{< alert type="warning" >}} @@ -301,10 +301,17 @@ Groups that are marked for deletion are labeled **Pending deletion**. - Enabled delayed deletion by default [on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/393622) and [on GitLab Self-Managed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/119606) in GitLab 16.0. - [Moved](https://gitlab.com/groups/gitlab-org/-/epics/17208) from GitLab Premium to GitLab Free in 18.0. -- Deleting a group immediately once it's scheduled for deletion is not allowed anymore in GitLab 18.4 [with a flag](../../administration/feature_flags/_index.md) named `disallow_immediate_deletion`. Disabled by default. +- Support for disallowing immediate deletion for groups or projects scheduled for deletion [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/201957) in GitLab 18.4 [with a flag](../../administration/feature_flags/_index.md) named `disallow_immediate_deletion`. Disabled by default. {{< /history >}} +{{< alert type="flag" >}} + +The availability of this feature is controlled by a feature flag. +For more information, see the history. + +{{< /alert >}} + If you don't want to wait, you can delete a group immediately. Prerequisites: diff --git a/doc/user/project/working_with_projects.md b/doc/user/project/working_with_projects.md index 5e9ec2e91cfd32..60019031513760 100644 --- a/doc/user/project/working_with_projects.md +++ b/doc/user/project/working_with_projects.md @@ -333,10 +333,17 @@ To upload an avatar in your project settings: - Option to delete projects immediately as a group setting removed [on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/393622) and [on GitLab Self-Managed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/119606) in GitLab 16.0. - Default behavior changed to delayed project deletion for [GitLab Free](https://gitlab.com/groups/gitlab-org/-/epics/17208) and [personal projects](https://gitlab.com/gitlab-org/gitlab/-/issues/536244) in 18.0. - Option to delete projects immediately [moved](https://gitlab.com/groups/gitlab-org/-/epics/17208) from GitLab Premium to GitLab Free in 18.0. -- Deleting a project immediately once it's scheduled for deletion is not allowed anymore in GitLab 18.4 [with a flag](../../administration/feature_flags/_index.md) named `disallow_immediate_deletion`. Disabled by default. +- Support for disallowing immediate deletion for groups or projects scheduled for deletion [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/201957) in GitLab 18.4 [with a flag](../../administration/feature_flags/_index.md) named `disallow_immediate_deletion`. Disabled by default. {{< /history >}} +{{< alert type="flag" >}} + +The availability of this feature is controlled by a feature flag. +For more information, see the history. + +{{< /alert >}} + You can schedule a project for deletion. By default, when you delete a project for the first time, it enters a pending deletion state. Delete a project again to remove it immediately. -- GitLab