Skip to content

Fix loading of ancestors for signed out users

Nicolas Dular requested to merge nd/fix-ancestor-loading into master

What does this MR do and why?

Issue: #433154 (closed)

Fix loading of ancestors for signed out users

When loading the ancestors for a work item, we optimize the querying of the data by preloading resources based on the users' access.

We also tried to preload resources for signed out users, where current_user was nil. This led to errors as the pre-loaders assume to have a user set.

Note: there are other bugs as well right now on the page if you load it as a signed-out user. This MR focuses on ancestors for now

Screenshots or screen recordings

Before After
Screenshot_2023-11-30_at_11.58.06 Screenshot_2023-11-30_at_11.51.57

How to set up and validate locally

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

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 Nicolas Dular

Merge request reports