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 Epicand add existing epicChild 1as a child - Visit
External Parentand add existing epicChild 2as a child - Add a new user
user2as owner oftest-group - Log in as
user2and export the group by visitingAdvancedin the group's settings:gdk.test:3000/groups/test-group/-/edit - Find the email
Test Group | Group was exportedby visitinghttp://gdk.test:3000/rails/letter_openerand download the attachment. - The JSON file containing the epics data should include the parent field for
Child 1but 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