Chore: get user from appcontext rather than store utility (#59926)

user from appcontext
This commit is contained in:
Ryan McKinley
2022-12-07 07:38:23 -08:00
committed by GitHub
parent e8ed79873a
commit d036225f7b
9 changed files with 31 additions and 51 deletions

View File

@ -13,8 +13,8 @@ import (
"github.com/grafana/grafana-plugin-sdk-go/data"
jsoniter "github.com/json-iterator/go"
"github.com/grafana/grafana/pkg/infra/appcontext"
"github.com/grafana/grafana/pkg/infra/db"
"github.com/grafana/grafana/pkg/services/store"
"github.com/grafana/grafana/pkg/services/user"
)
@ -77,7 +77,7 @@ func (ch *commitHelper) initOrg(ctx context.Context, sql db.DB, orgID int64) err
OrgID: orgID, // gets filled in from each row
UserID: 0,
}
ch.ctx = store.ContextWithUser(context.Background(), rowUser)
ch.ctx = appcontext.WithUser(context.Background(), rowUser)
return err
})
}