Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-12-02 12:07:15 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-02 12:07:15 +0300
commit81745c5a7143999d492943a2dceb977ced0a766f (patch)
treecbac52d222a8886c84d5f7750662e30d2ff5cb87 /lib/gitlab/import_export
parent5ab92edc77d032261ce105e3fa13355b92f8ed32 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/import_export')
-rw-r--r--lib/gitlab/import_export/group/import_export.yml20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/gitlab/import_export/group/import_export.yml b/lib/gitlab/import_export/group/import_export.yml
index a08efdf400b..7f3254be3e8 100644
--- a/lib/gitlab/import_export/group/import_export.yml
+++ b/lib/gitlab/import_export/group/import_export.yml
@@ -132,3 +132,23 @@ ee:
- :push_event_payload
- iterations_cadences:
- :iterations
+
+# When associated resources are from outside the group, you might need to
+# validate that a user who is exporting the group can access these
+# associations. `include_if_exportable` accepts an array of associations for a
+# resource. During export, the `exportable_association?` method on the
+# resource is called with the association's name and user to validate if
+# associated resource can be included in the export.
+#
+# This definition will call epic's `exportable_association?(:parent,
+# current_user: current_user)` method and include epic's parent association
+# for each epic only if the method returns true:
+#
+# include_if_exportable:
+# group:
+# epics:
+# - :parent
+include_if_exportable:
+ group:
+ epics:
+ - :parent