From 1c07fd3d4f58af77d4016cac6fd32259070625c0 Mon Sep 17 00:00:00 2001 From: Eric Leijonmarck Date: Wed, 2 Apr 2025 10:25:42 +0100 Subject: [PATCH] feat: add ft and add datasource:explore to viewers for viewers_can_edit (#103251) * feat: add ft and add datasource:explore to viewers for viewers_can_edit * removed the feature toggle * remove file --- pkg/api/accesscontrol.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/api/accesscontrol.go b/pkg/api/accesscontrol.go index 8fec8c2d2f7..fba8973eaa3 100644 --- a/pkg/api/accesscontrol.go +++ b/pkg/api/accesscontrol.go @@ -71,6 +71,11 @@ func (hs *HTTPServer) declareFixedRoles() error { Grants: []string{string(org.RoleEditor)}, } + //nolint:staticcheck // ViewersCanEdit is deprecated but still used for backward compatibility + if hs.Cfg.ViewersCanEdit { + datasourcesExplorerRole.Grants = append(datasourcesExplorerRole.Grants, string(org.RoleViewer)) + } + datasourcesReaderRole := ac.RoleRegistration{ Role: ac.RoleDTO{ Name: "fixed:datasources:reader",