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
This commit is contained in:
Ieva
2023-05-10 14:05:53 +01:00
committed by GitHub
parent 1f43c62d03
commit e51b92991d

View File

@@ -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)