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 d20cfc309226bf1c52bf41b7353c3f023ff963c6..74ca91a9beea9911f90bfbffe7b35f287d57f7f3 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 a5e7a144295d4d6b1fa9663470b9dfe88455de2f..d4e035edef52f06213c3c794c00e4c096239e23a 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 94ff3996495d90868394c47a803c41b7a1c5b07c..f3cf4090bf191dbbb6d9a6f5101bef142ceac96d 100644 --- a/doc/administration/settings/visibility_and_access_controls.md +++ b/doc/administration/settings/visibility_and_access_controls.md @@ -96,38 +96,32 @@ 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. +- 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 >}} -These protections help guard against accidental deletion of groups and projects on your instance. - -### Retention period +{{< alert type="flag" >}} -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. +The availability of this feature is controlled by a feature flag. +For more information, see the history. -### Delayed project deletion +{{< /alert >}} -{{< history >}} +These protections help guard against accidental deletion of groups and projects on your instance. -- 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. +### Retention period -{{< /history >}} +Groups and projects remain restorable during the retention period you define. By default, +the retention period 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 +129,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 041596821676cf40c9c4ec7bcb29e7bb06ecc21e..bac4353cbe78fdcf5ac3daa75824967c3ed23736 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 db8e022b4c1bda236760798af6c2af208ca1a4bd..6910a86e595bad571a90c36ca2ea5a72b13a68a0 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 cda91184baba5995df86beb2a40038eb22937f26..14190f2104a4f412c97de2cadc3e7cd0a7a7f7c4 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 instead restores the group, and the group is no longer scheduled for deletion. {{< alert type="warning" >}} @@ -299,11 +299,19 @@ 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. +- 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 a568927115fb31bb3790ce9f61d5f7780bd3f6f8..6001903151376044eec886dbc07204d57ddfa64e 100644 --- a/doc/user/project/working_with_projects.md +++ b/doc/user/project/working_with_projects.md @@ -333,9 +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. +- 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. 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 6adfdac5f57eae5c4d9fe483cbce92880bcadb7f..18ef0608235cbbe523555bc2a25528cded46445d 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', }), ); });