Bring 'deletion in progress' methods to Namespace::AdjournedDeletable

What does this MR do and why?

Code Changes Summary

This change consolidates deletion-related functionality by removing the standalone DeletableNamespace module and integrating its methods into the existing Namespaces::AdjournedDeletable module. The key method deletion_in_progress_or_scheduled_in_hierarchy_chain? has been moved to the AdjournedDeletable module, along with the requirement for models to implement self_deletion_in_progress?.

The Namespace class now properly overrides self_deletion_in_progress? to check the deleted_at attribute, while Project implements it to check the pending_delete? status. The ProjectNamespace class now delegates to the project's implementation.

Tests have been updated accordingly, with the DeletableNamespace tests being moved to the Namespaces::AdjournedDeletable spec file. This refactoring improves code organization by centralizing deletion-related functionality in one place while maintaining the same behavior.

References

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 Rémy Coutable

Merge request reports

Loading