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
pull/68321/head
Ieva 3 years ago committed by GitHub
parent 1f43c62d03
commit e51b92991d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      pkg/services/folder/folderimpl/folder.go

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

Loading…
Cancel
Save