Skip to content

Permit new projects to be created from active templates only

Aishwarya Subramanian requested to merge fix-group-project-template-list into master

What does this MR do?

Issue

Currently, while creating new projects via Group-level project templates, it lists archived project templates (scheduled to be deleted at a future date via delayed deletion) as an option.

This MR adds a fix to only list projects that are active.

Mentions #225614 (closed)

Screenshots

On configuring inactive project template for delayed deletion:

Before After
before after

Local testing

  1. Create a new group, say main-group
  2. Create a sub-group, say sub-group
  3. Configure the sub-group to be a template source:
    • Go to main-group Settings > General > Custom project templates
    • Select sub-group from the list and Save
  4. Create a project within sub-group, say project-template
  5. Try creating a new project via template (/projects/new -> Create from template -> Select Group menu)
    • project-template shows up in the list
  6. Enable delayed deletion for sub-group (Steps documentation)
  7. Delete project project-template
  8. Repeat Step 5, the project project-template should not show up

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Aishwarya Subramanian

Merge request reports