apply security patch: release-11.6.1/394-202504041254.patch

commit 062c1375784db35ff03d410113d104a9eea46475
Author: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
Date:   Fri Apr 4 13:50:50 2025 +0100

    APIs: Remove dashboard and folder registration
pull/104467/head
github-actions[bot] 2 months ago
parent c1ddd2962b
commit cb147983f2
  1. 10
      pkg/registry/apis/dashboard/register.go
  2. 3
      pkg/registry/apis/folders/register.go

@ -30,17 +30,13 @@ import (
"github.com/grafana/grafana/pkg/infra/db"
"github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana/pkg/infra/tracing"
"github.com/grafana/grafana/pkg/registry/apis/dashboard/legacy"
"github.com/grafana/grafana/pkg/registry/apis/dashboard/legacysearcher"
"github.com/grafana/grafana/pkg/services/accesscontrol"
"github.com/grafana/grafana/pkg/services/apiserver/builder"
"github.com/grafana/grafana/pkg/services/apiserver/endpoints/request"
"github.com/grafana/grafana/pkg/services/dashboards"
"github.com/grafana/grafana/pkg/services/featuremgmt"
"github.com/grafana/grafana/pkg/services/provisioning"
"github.com/grafana/grafana/pkg/services/search/sort"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/storage/legacysql"
"github.com/grafana/grafana/pkg/storage/legacysql/dualwrite"
"github.com/grafana/grafana/pkg/storage/unified/apistore"
"github.com/grafana/grafana/pkg/storage/unified/resource"
@ -85,7 +81,8 @@ func RegisterAPIService(
dual dualwrite.Service,
sorter sort.Service,
) *DashboardsAPIBuilder {
softDelete := features.IsEnabledGlobally(featuremgmt.FlagDashboardRestore)
// disable dashboard api in 11.6
/* softDelete := features.IsEnabledGlobally(featuremgmt.FlagDashboardRestore)
dbp := legacysql.NewDatabaseProvider(sql)
namespacer := request.GetNamespaceMapper(cfg)
legacyDashboardSearcher := legacysearcher.NewDashboardSearchClient(dashStore, sorter)
@ -105,7 +102,8 @@ func RegisterAPIService(
reg: reg,
}
apiregistration.RegisterAPI(builder)
return builder
return builder*/
return nil
}
func (b *DashboardsAPIBuilder) GetGroupVersions() []schema.GroupVersion {

@ -67,7 +67,8 @@ func RegisterAPIService(cfg *setting.Cfg,
registerer prometheus.Registerer,
unified resource.ResourceClient,
) *FolderAPIBuilder {
if !featuremgmt.AnyEnabled(features,
// disable api in 11.6
if true || !featuremgmt.AnyEnabled(features,
featuremgmt.FlagKubernetesClientDashboardsFolders,
featuremgmt.FlagGrafanaAPIServerWithExperimentalAPIs,
featuremgmt.FlagProvisioning) {

Loading…
Cancel
Save