Fix work item loading as signed out user
What does this MR do and why?
Fix work item loading as signed out user
This fixes a bug where a signed out user would see a GraphQL error
message when loading a public work item. The reason is that we try to
load the namespace
as part of the work item query. However, Namespace
is only allowed to be read when the user is a team member.
As we only require the fullPath
from the namespace
to perform our
GraphQL query, we can also use the injected fullPath
in our Vue
component, instead of changing the permissions on the GraphQL API layer.
Changelog: fixed
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
- Create a work item in a public group
- Go to the Work Item with a signed out user (easiest to replicate with an anonymous browser window)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.