Skip to content

Resolve "Groups originating from group shares, where the user has access to should appear in the result of the GET /:group_id/transfer_locations API"

What does this MR do and why?

This MR adds the group arising from group shares, where the user has access to transfer another group to the result of the GET /:group_id/transfer_locations API.

SQL queries generated

Queries generated are for user: gitlab-qa (User ID:1614863), trying to access the API for the group https://gitlab.com/gitlab-org/database-team (Group ID: 6104555)

Before the feature flag is enabled

Query for 1st page: https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/11787/commands/41793

Query for 20th page: https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/11787/commands/41792

Query for 200th page, with limit 100 per page: https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/11787/commands/41791

After the feature flag is enabled

Query for 1st page: https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/11842/commands/42038

Query for 20th page: https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/11842/commands/42039

Query for 200th page, with limit 100 per page: https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/11842/commands/42040

Kibana dashboard to measure performance: Link

Screenshots or screen recordings

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

How to set up and validate locally

  • Login as admin, create groups
    • Group A
      • Subgroup A
    • Group B
      • Subgroup B
    • Group C
      • Subgroup C
  • Add another user, User X as member in Group A and Group B with Owner access
  • Go to members page of Group C, and invite Group A into this group with Owner access. This means that user User X now has Owner access with Group C and its subgroups. So they should be able to transfer a group they own to Group C's hierarchy.
  • Login as User X
  • Access GET /:group_id_of_group_a/transfer_locations, you should be able to see Group B and subgroup B in the list.

Previously:

  • Group C and Subgroup C does not appear in the list.

Now:

  • After enabling the feature flag include_groups_from_group_shares_in_group_transfer_locations via Rails console, you can see Group C and Subgroup C in the list.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #365221 (closed)

Edited by Manoj M J

Merge request reports

Loading