EntityStore: Use standard user identifier rather than custom version (#89080)

user uid string
This commit is contained in:
Ryan McKinley
2024-06-12 19:39:34 +03:00
committed by GitHub
parent 1abaa825c6
commit ed400f0bbf
3 changed files with 2 additions and 34 deletions
+1 -2
View File
@@ -9,7 +9,6 @@ import (
"text/template"
"github.com/grafana/grafana/pkg/infra/appcontext"
"github.com/grafana/grafana/pkg/services/store"
"github.com/grafana/grafana/pkg/services/store/entity/db"
"github.com/grafana/grafana/pkg/services/store/entity/sqlstash/sqltemplate"
)
@@ -33,7 +32,7 @@ func getCurrentUser(ctx context.Context) (string, error) {
return "", fmt.Errorf("%w: %w", ErrUserNotFoundInContext, err)
}
return store.GetUserIDString(user), nil
return user.GetUID().String(), nil
}
// ptrOr returns the first non-nil pointer in the list or a new non-nil pointer.