mirror of
https://github.com/grafana/grafana.git
synced 2025-08-06 05:19:25 +08:00
Chore: get user from appcontext rather than store utility (#59926)
user from appcontext
This commit is contained in:
@ -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
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user