Skip to content

Preserve existing shared memberships on direct transfer import

What does this MR do and why?

Previously Direct Transfer would create direct memberships in an imported project/group even if the user already had a "shared" or "inherited shared" membership within the imported project/group.

However, it would not create a direct membership for "inherited" memberships.

This was because the finders we use searched only "direct" and "inherited" members, but not "shared" or "inherited shared" members, and so did not identify an existing "shared" or "inherited shared" membership.

The result would be that existing "inherited" memberships would be left intact, but existing "shared" or "inherited shared" memberships would not - and the member would be imported as a direct member.

This change preserves existing shared and inherited shared memberships on the destination in the same way as inherited memberships are.

Direct Transfer imports all indirect (inherited, shared and inherited shared) memberships from source (code). This change means the destination can be configured in the same way as the source in regard to its indirect memberships, and they will all be preserved after import.

Some useful doc resources on shared and inherited shared memberships:

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Luke Duncalfe

Merge request reports