mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Plugins: Account for nil user when constructing plugin context (#69811)
cater for nil user
This commit is contained in:
@@ -74,7 +74,7 @@ func NewContextGetter(pluginContextProvider *plugincontext.Provider, dataSourceC
|
||||
|
||||
func (g *ContextGetter) GetPluginContext(ctx context.Context, user *user.SignedInUser, pluginID string, datasourceUID string, skipCache bool) (backend.PluginContext, error) {
|
||||
if datasourceUID == "" {
|
||||
return g.pluginContextProvider.Get(ctx, pluginID, user)
|
||||
return g.pluginContextProvider.Get(ctx, pluginID, user, user.OrgID)
|
||||
}
|
||||
|
||||
ds, err := g.dataSourceCache.GetDatasourceByUID(ctx, datasourceUID, user, skipCache)
|
||||
|
||||
Reference in New Issue
Block a user