Organization groups list - add support for delayed group deletion
Background
When deleting a group from the organization groups list (/-/organizations/default/groups_and_projects
) there is no indicator if the group will be deleted immediately or delayed.
Proposal
We need to support this flow outlined in https://docs.gitlab.com/ee/user/group/#remove-a-group
Implementation plan
- Expose ee/app/models/ee/group.rb#L586 on https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/graphql/ee/types/group_type.rb#L30 as
is_adjourned_deletion_enabled
- If
is_adjourned_deletion_enabled
istrue
expose ee/app/helpers/ee/groups_helper.rb#L43 on https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/graphql/ee/types/group_type.rb#L30 aspermanent_deletion_date
- If
is_adjourned_deletion_enabled
istrue
exposemarked_for_deletion_at
- Add
modal-footer
slot to app/assets/javascripts/vue_shared/components/confirm_danger/confirm_danger_modal.vue#L128 - Add
delete-modal-footer
slot to app/assets/javascripts/vue_shared/components/groups_list/groups_list_item.vue#L206 - Create an
ee
version of app/assets/javascripts/vue_shared/components/groups_list/groups_list_item.vue#L206
- Render the
ce
version and use thedelete-modal-footer
slot to add message similar to ee/app/assets/javascripts/projects/components/project_delayed_delete_button.vue#L70 ifis_adjourned_deletion_enabled
istrue
- Create a new util in app/assets/javascripts/organizations/shared/utils.js#L74 called
renderGroupDeleteSuccessAlert
that callscreateAlert
with the message<group name> is in the process of being deleted.
- Create a ee version of this util in
ee/app/assets/javascripts/organizations/shared/utils.js
that checks- If
is_adjourned_deletion_enabled
istrue
callcreateAlert
with the message<project name> will be deleted on <permanent_deletion_date>.
- If
- Create a new util in
ee/app/assets/javascripts/organizations/shared/utils.js
calleddeleteGroupParams
. Ifmarked_for_deletion_at
is set then pass thepermanently_remove
param when calling theDELETE /groups/:id
API
Edited by Peter Hegman