AuthZ service: Correctly evaluate action sets for dashboard creation (#112425)

correctly evaluate dash creation action sets
This commit is contained in:
Ieva
2025-10-15 15:34:19 +01:00
committed by GitHub
parent 2296474f73
commit 5c9dd9b068
+7
View File
@@ -124,6 +124,13 @@ func newDashboardTranslation() translation {
actionSetMapping := make(map[string][]string)
for verb, rbacAction := range dashTranslation.verbMapping {
var dashActionSets []string
// Dashboard creation is only part of folder action sets, so we handle it separately
if rbacAction == "dashboards:create" {
dashActionSets = append(dashActionSets, "folders:edit")
dashActionSets = append(dashActionSets, "folders:admin")
}
if slices.Contains(ossaccesscontrol.DashboardViewActions, rbacAction) {
dashActionSets = append(dashActionSets, "dashboards:view")
dashActionSets = append(dashActionSets, "folders:view")