From b97b1cc730d7135ab0e41970bead07a80c63ed6d Mon Sep 17 00:00:00 2001 From: Stephanie Hingtgen Date: Thu, 3 Apr 2025 10:57:26 +0100 Subject: [PATCH] K8s: Revert change around full path (#103334) --- pkg/registry/apis/folders/legacy_storage.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/registry/apis/folders/legacy_storage.go b/pkg/registry/apis/folders/legacy_storage.go index 473a1273140..8c350cacc67 100644 --- a/pkg/registry/apis/folders/legacy_storage.go +++ b/pkg/registry/apis/folders/legacy_storage.go @@ -19,7 +19,6 @@ import ( "github.com/grafana/grafana/pkg/services/dashboards" "github.com/grafana/grafana/pkg/services/featuremgmt" "github.com/grafana/grafana/pkg/services/folder" - "github.com/grafana/grafana/pkg/services/org" "github.com/grafana/grafana/pkg/setting" "github.com/grafana/grafana/pkg/util" ) @@ -107,8 +106,7 @@ func (s *legacyStorage) List(ctx context.Context, options *internalversion.ListO paging.page = 1 } - // only admins can add this to the query, otherwise we may return parent folder names that are not visible to the user - if user.GetOrgRole() == org.RoleAdmin && options.LabelSelector != nil && options.LabelSelector.Matches(labels.Set{utils.LabelGetFullpath: "true"}) { + if options.LabelSelector != nil && options.LabelSelector.Matches(labels.Set{utils.LabelGetFullpath: "true"}) { query.WithFullpath = true query.WithFullpathUIDs = true }