Chore: get user from appcontext rather than store utility (#59926)
user from appcontext
This commit is contained in:
@@ -5,10 +5,10 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"github.com/grafana/grafana/pkg/infra/appcontext"
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
"github.com/grafana/grafana/pkg/services/playlist"
|
||||
"github.com/grafana/grafana/pkg/services/sqlstore/session"
|
||||
objectstore "github.com/grafana/grafana/pkg/services/store"
|
||||
"github.com/grafana/grafana/pkg/services/store/entity"
|
||||
"github.com/grafana/grafana/pkg/services/user"
|
||||
)
|
||||
@@ -44,7 +44,7 @@ func (s *entityStoreImpl) sync() {
|
||||
UserID: 0, // Admin user
|
||||
IsGrafanaAdmin: true,
|
||||
}
|
||||
ctx := objectstore.ContextWithUser(context.Background(), rowUser)
|
||||
ctx := appcontext.WithUser(context.Background(), rowUser)
|
||||
for _, info := range results {
|
||||
dto, err := s.sqlimpl.Get(ctx, &playlist.GetPlaylistByUidQuery{
|
||||
OrgId: info.OrgID,
|
||||
|
||||
Reference in New Issue
Block a user