Object store: get user from context (#56346)

* GRPC Server: Add signedInUser to context after auth

* add permissions to signedInUser

* add access control permissions test

* add additional signedInUser checks

* get user from context

* move `UserFromContext` to object/auth.go

Co-authored-by: Todd Treece <todd.treece@grafana.com>
This commit is contained in:
Artur Wierzbicki
2022-10-05 17:00:34 +00:00
committed by GitHub
co-authored by Todd Treece
parent 4a14d75086
commit a94acb7f61
4 changed files with 42 additions and 17 deletions
@@ -149,8 +149,8 @@ func TestObjectServer(t *testing.T) {
ctx = metadata.AppendToOutgoingContext(ctx, "authorization", fmt.Sprintf("Bearer %s", testCtx.authToken))
fakeUser := &object.UserInfo{
Login: "fake",
Id: 1,
Login: testCtx.user.Login,
Id: testCtx.user.UserID,
}
firstVersion := "1"
kind := "dashboard"