Skip to content

Fix missing groups in User#authorized_groups

What does this MR do and why?

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.

Queries

Note that I changed the SELECT to "namespaces".* instead of listing every column of the table to improve readability

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.

How to set up and validate locally

See #482866 (closed)

Related to #482866 (closed)

Edited by Heinrich Lee Yu

Merge request reports

Loading