Permit new projects to be created from active templates only
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 |
---|---|
Local testing
- Create a new group, say
main-group
- Create a sub-group, say
sub-group
- 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
- Go to
- Create a project within
sub-group
, sayproject-template
- Try creating a new project via template (
/projects/new
->Create from template
-> SelectGroup
menu)-
project-template
shows up in the list
-
- Enable delayed deletion for
sub-group
(Steps documentation) - Delete project
project-template
- Repeat Step 5, the project
project-template
should not show up
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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