insights: dashboard mutations are throwing user permissions error
Created by: coury-clark
Sometimes when making a request on a dashboard, an authorization error is returning. Looking at the trace, it seems the wrong userId is getting passed into the authorization context: https://sourcegraph.grafana.net/explore?orgId=1&left=%5B%22now-1h%22,%22now%22,%22grafanacloud-sourcegraph-traces%22,%7B%22refId%22:%22A%22,%22queryType%22:%22traceId%22,%22query%22:%223f76304056d4cad3%22%7D%5D
I suspect the permissionsValidator
being attached globally to the Resolver
isn't getting created on each user request, and instead is trying to share values across sessions. https://sourcegraph.grafana.net/explore?orgId=1&left=%5B%22now-1h%22,%22now%22,%22grafanacloud-sourcegraph-traces%22,%7B%22refId%22:%22A%22,%22queryType%22:%22traceId%22,%22query%22:%223f76304056d4cad3%22%7D%5D