mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Nested Folders: Some API fixes (#59298)
* Nested Folders: Fix API responses * Fix panic during deletions * Add test
This commit is contained in:
committed by
GitHub
parent
1a6b46e98d
commit
8e6d343981
@@ -20,10 +20,10 @@ type Folder struct {
|
||||
Created time.Time `json:"created"`
|
||||
UpdatedBy string `json:"updatedBy"`
|
||||
Updated time.Time `json:"updated"`
|
||||
Version int `json:"version"`
|
||||
Version int `json:"version,omitempty"`
|
||||
AccessControl accesscontrol.Metadata `json:"accessControl,omitempty"`
|
||||
// only used if nested folders are enabled
|
||||
ParentUID string `json:"parentUid"`
|
||||
ParentUID string `json:"parentUid,omitempty"`
|
||||
}
|
||||
|
||||
type FolderSearchHit struct {
|
||||
|
||||
@@ -251,6 +251,7 @@ func (hs *HTTPServer) newToFolderDto(c *models.ReqContext, g guardian.DashboardG
|
||||
Updated: folder.Updated,
|
||||
Version: folder.Version,
|
||||
AccessControl: hs.getAccessControlMetadata(c, c.OrgID, dashboards.ScopeFoldersPrefix, folder.UID),
|
||||
ParentUID: folder.ParentUID,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user