grafana/pkg/services/ngalert/eval/context.go
Jo 580477bf8e
NGAlerting: Use identity.Requester interface instead of SignedInUser (#76360)
* unfurl SignedInUserAttrs services

* replace signedInUser with Requester

replace signedInUser with requester

* fix tests

* linting

---------

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2023-11-14 14:47:34 +00:00

21 lines
397 B
Go

package eval
import (
"context"
"github.com/grafana/grafana/pkg/services/auth/identity"
)
// EvaluationContext represents the context in which a condition is evaluated.
type EvaluationContext struct {
Ctx context.Context
User identity.Requester
}
func NewContext(ctx context.Context, user identity.Requester) EvaluationContext {
return EvaluationContext{
Ctx: ctx,
User: user,
}
}