Skip to content

Fix missing groups in User#authorized_groups

What does this MR do and why?

Fix missing groups in User#authorized_groups

This fixes two cases where groups were missing from the user's authorized groups:

  1. Ancestors of projects the user has access to

    Right now, we only consider the direct parent but we actually grant access to all ancestor groups of the project.

  2. Descendants of groups the user has access via shares

    Right now, we only include the group being shared but the user also has access to all descendants of the shared group.

Changelog: fixed

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.

Related to #482866

Merge request reports