Auth: Update unified storage to depend on AuthInfo rather than Requester (#91783)

depend on authlib user info
This commit is contained in:
Ryan McKinley
2024-08-12 09:49:34 +03:00
committed by GitHub
parent 21d4a4f49e
commit e106df6d0b
3 changed files with 21 additions and 20 deletions
+4 -5
View File
@@ -8,14 +8,13 @@ import (
"testing"
"time"
"github.com/grafana/authlib/claims"
"github.com/grafana/grafana/pkg/apimachinery/identity"
"github.com/grafana/grafana/pkg/apimachinery/utils"
"github.com/stretchr/testify/require"
"gocloud.dev/blob/fileblob"
"gocloud.dev/blob/memblob"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"github.com/grafana/authlib/claims"
"github.com/grafana/grafana/pkg/apimachinery/identity"
"github.com/grafana/grafana/pkg/apimachinery/utils"
)
func TestSimpleServer(t *testing.T) {
@@ -27,7 +26,7 @@ func TestSimpleServer(t *testing.T) {
OrgRole: identity.RoleAdmin,
IsGrafanaAdmin: true, // can do anything
}
ctx := identity.WithRequester(context.Background(), testUserA)
ctx := claims.WithClaims(context.Background(), testUserA)
bucket := memblob.OpenBucket(nil)
if false {