Skip to content

Fix approval rules group finder for unauthorized users

Vasilii Iakliushin requested to merge 366741_fix_case_for_unauthorized_user into master

What does this MR do and why?

Problem

GroupPolicyPreloader does not correctly handles unauthorized users.

Solution

  • Show only public groups to unauthorized users
  • Don't preload groups for unauthorized users

Screenshots or screen recordings

Before After
Screenshot_2022-07-15_at_13.50.43 Screenshot_2022-07-15_at_13.43.37

How to set up and validate locally

  1. Enable feature flag Feature.enable(:subgroups_approval_rules)
  2. Visit http://localhost:3000/api/v4/projects/6/merge_requests/1/approvals (As an unauthorized user)

MR acceptance checklist

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

Edited by Vasilii Iakliushin

Merge request reports