RBAC: correctly fetch nested folder metadata (#78655)

fix a bug with nested folder metadata
This commit is contained in:
Ieva
2023-11-28 09:28:47 +00:00
committed by GitHub
parent 529271d7a8
commit d201d3f7db

View File

@@ -431,8 +431,7 @@ func (hs *HTTPServer) getFolderACMetadata(c *contextmodel.ReqContext, f *folder.
} }
allMetadata := hs.getMultiAccessControlMetadata(c, dashboards.ScopeFoldersPrefix, folderIDs) allMetadata := hs.getMultiAccessControlMetadata(c, dashboards.ScopeFoldersPrefix, folderIDs)
metadata := allMetadata[f.UID] metadata := map[string]bool{}
// Flatten metadata - if any parent has a permission, the child folder inherits it // Flatten metadata - if any parent has a permission, the child folder inherits it
for _, md := range allMetadata { for _, md := range allMetadata {
for action := range md { for action := range md {