K8s: Revert change around full path (#103334)

pull/103335/head
Stephanie Hingtgen 4 months ago committed by GitHub
parent f4ae8516bd
commit b97b1cc730
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      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
}

Loading…
Cancel
Save