mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
RBAC: correctly fetch nested folder metadata (#78655)
fix a bug with nested folder metadata
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user