diff --git a/pkg/api/api.go b/pkg/api/api.go index ec6c3c3cbe3..87cf69d966d 100644 --- a/pkg/api/api.go +++ b/pkg/api/api.go @@ -38,6 +38,7 @@ import ( "github.com/grafana/grafana/pkg/api/routing" "github.com/grafana/grafana/pkg/middleware" "github.com/grafana/grafana/pkg/middleware/requestmeta" + "github.com/grafana/grafana/pkg/registry/apis/secret" ac "github.com/grafana/grafana/pkg/services/accesscontrol" "github.com/grafana/grafana/pkg/services/accesscontrol/ssoutils" "github.com/grafana/grafana/pkg/services/auth" @@ -129,6 +130,14 @@ func (hs *HTTPServer) registerRoutes() { r.Get("/admin/featuretoggles", authorize(ac.EvalPermission(ac.ActionFeatureManagementRead)), hs.Index) } + // secrets management page + if hs.Features.IsEnabledGlobally(featuremgmt.FlagSecretsManagementAppPlatform) && hs.Features.IsEnabledGlobally(featuremgmt.FlagSecretsManagementAppPlatformUI) { + r.Get("/admin/secrets", authorize(ac.EvalAny( + ac.EvalPermission(secret.ActionSecretSecureValuesCreate), + ac.EvalPermission(secret.ActionSecretSecureValuesRead), + )), hs.Index) + } + r.Get("/styleguide", reqSignedIn, hs.Index) r.Get("/live", reqGrafanaAdmin, hs.Index)