mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
@@ -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