Revert "Config: Removes setting viewers_can_edit (#101767)" (#102191)

This reverts commit d3a9c04562.
This commit is contained in:
Eric Leijonmarck
2025-03-14 13:39:59 +00:00
committed by GitHub
parent 75156324f4
commit 56c896fa72
5 changed files with 50 additions and 12 deletions
+5
View File
@@ -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",