mirror of
https://github.com/grafana/grafana.git
synced 2025-02-15 18:13:32 -06:00
* remove metadata for single folder listing * extendTests * remove ac metadata from dash and folder search results * remove test * remove one more test * put ac metadata back for single folder API responses * extend tests * remove ac metadata from folder frontend object * undo unneeded change * PR feedback Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com> --------- Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
35 lines
1.2 KiB
Go
35 lines
1.2 KiB
Go
package dtos
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/grafana/grafana/pkg/services/accesscontrol"
|
|
)
|
|
|
|
type Folder struct {
|
|
Id int64 `json:"id"`
|
|
Uid string `json:"uid"`
|
|
Title string `json:"title"`
|
|
Url string `json:"url"`
|
|
HasACL bool `json:"hasAcl" xorm:"has_acl"`
|
|
CanSave bool `json:"canSave"`
|
|
CanEdit bool `json:"canEdit"`
|
|
CanAdmin bool `json:"canAdmin"`
|
|
CanDelete bool `json:"canDelete"`
|
|
CreatedBy string `json:"createdBy"`
|
|
Created time.Time `json:"created"`
|
|
UpdatedBy string `json:"updatedBy"`
|
|
Updated time.Time `json:"updated"`
|
|
Version int `json:"version,omitempty"`
|
|
AccessControl accesscontrol.Metadata `json:"accessControl,omitempty"`
|
|
// only used if nested folders are enabled
|
|
ParentUID string `json:"parentUid,omitempty"`
|
|
}
|
|
|
|
type FolderSearchHit struct {
|
|
Id int64 `json:"id"`
|
|
Uid string `json:"uid"`
|
|
Title string `json:"title"`
|
|
ParentUID string `json:"parentUid,omitempty"`
|
|
}
|