Check if epic's parent is exportable when exporting a group
Related to #384024 (closed)
What does this MR do and why?
When introducing cross-group child epics there might be cases where the user cannot read an epic's parent, even if they have sufficient permission to export the group.
This MR implements conditional export for epic's parent association.
Validate locally
- In rails console enable cross-group child epics
Feature.enable(:child_epics_from_different_hierarchies)
- Create a group (
test-group
) with 3 epics:Child 1
,Child 2
,Parent Epic
- Create a private group (
private-group
) with 1 epic:External Parent
- Visit
Parent Epic
and add existing epicChild 1
as a child - Visit
External Parent
and add existing epicChild 2
as a child - Add a new user
user2
as owner oftest-group
- Log in as
user2
and export the group by visitingAdvanced
in the group's settings:gdk.test:3000/groups/test-group/-/edit
- Find the email
Test Group | Group was exported
by visitinghttp://gdk.test:3000/rails/letter_opener
and download the attachment. - The JSON file containing the epics data should include the parent field for
Child 1
but not forChild 2
.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Eugenia Grieff