mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 23:42:51 +08:00
Plugins: Account for nil user when constructing plugin context (#69811)
cater for nil user
This commit is contained in:
@ -26,7 +26,7 @@ func (hs *HTTPServer) CallResource(c *contextmodel.ReqContext) {
|
||||
}
|
||||
|
||||
func (hs *HTTPServer) callPluginResource(c *contextmodel.ReqContext, pluginID string) {
|
||||
pCtx, err := hs.pluginContextProvider.Get(c.Req.Context(), pluginID, c.SignedInUser)
|
||||
pCtx, err := hs.pluginContextProvider.Get(c.Req.Context(), pluginID, c.SignedInUser, c.OrgID)
|
||||
if err != nil {
|
||||
if errors.Is(err, plugincontext.ErrPluginNotFound) {
|
||||
c.JsonApiErr(404, "Plugin not found", nil)
|
||||
|
Reference in New Issue
Block a user