mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fix panic in legacy alerting after identity.Requester migration (#74265)
This commit is contained in:
committed by
GitHub
parent
124f445db0
commit
76d9f46edb
@@ -49,7 +49,7 @@ func (p *Provider) Get(ctx context.Context, pluginID string, user identity.Reque
|
||||
pCtx := backend.PluginContext{
|
||||
PluginID: pluginID,
|
||||
}
|
||||
if user != nil {
|
||||
if user != nil && !user.IsNil() {
|
||||
pCtx.OrgID = user.GetOrgID()
|
||||
pCtx.User = adapters.BackendUserFromSignedInUser(user)
|
||||
}
|
||||
@@ -77,7 +77,7 @@ func (p *Provider) GetWithDataSource(ctx context.Context, pluginID string, user
|
||||
pCtx := backend.PluginContext{
|
||||
PluginID: pluginID,
|
||||
}
|
||||
if user != nil {
|
||||
if user != nil && !user.IsNil() {
|
||||
pCtx.OrgID = user.GetOrgID()
|
||||
pCtx.User = adapters.BackendUserFromSignedInUser(user)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user