[v10.0.x] Folders: return an error when listing folders if permission guardian returns an error (#68224)
Folders: return an error when listing folders if permission guardian returns an error (#68109)
return an error when listing folders if perm gaurdian returns an error
(cherry picked from commit e51b92991d)
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
This commit is contained in:
co-authored by
Ieva
parent
e77a9c1269
commit
cc2e352c03
@@ -183,7 +183,10 @@ func (s *Service) GetChildren(ctx context.Context, cmd *folder.GetChildrenQuery)
|
||||
return nil, err
|
||||
}
|
||||
canView, err := g.CanView()
|
||||
if err != nil || canView {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if canView {
|
||||
// always expose the dashboard store sequential ID
|
||||
f.ID = dashFolder.ID
|
||||
filtered = append(filtered, f)
|
||||
|
||||
Reference in New Issue
Block a user