Chore: Replace appcontext.User(ctx) with identity.GetRequester(ctx) (#91030)

This commit is contained in:
Ryan McKinley
2024-07-26 16:39:23 +03:00
committed by GitHub
parent ddd38afa57
commit be7b1ce2df
21 changed files with 68 additions and 215 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/grafana/grafana/pkg/infra/appcontext"
"github.com/grafana/grafana/pkg/apimachinery/identity"
"github.com/grafana/grafana/pkg/services/user"
)
@@ -105,7 +105,7 @@ func (f testContextFunc) CancelCause(err error) {
}
func (f testContextFunc) WithUser(usr *user.SignedInUser) TestContext {
ctx := appcontext.WithUser(f, usr)
ctx := identity.WithRequester(f, usr)
return testContextFunc(func() (context.Context, context.CancelFunc, context.CancelCauseFunc) {
return ctx, f.Cancel, f.CancelCause