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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -431,8 +431,7 @@ func (hs *HTTPServer) getFolderACMetadata(c *contextmodel.ReqContext, f *folder.
}
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
for _, md := range allMetadata {
for action := range md {