snapshots: change to snapshot list query
Admins can see all snapshots. Other roles can only see their own snapshots. Added permission check for deleting snapshots - admins can delete any snapshot, other roles can delete their own snapshots or snapshots that they have access to via dashboard permissions.
This commit is contained in:
@@ -67,7 +67,8 @@ type DeleteExpiredSnapshotsCommand struct {
|
||||
}
|
||||
|
||||
type GetDashboardSnapshotQuery struct {
|
||||
Key string
|
||||
Key string
|
||||
DeleteKey string
|
||||
|
||||
Result *DashboardSnapshot
|
||||
}
|
||||
@@ -76,9 +77,10 @@ type DashboardSnapshots []*DashboardSnapshot
|
||||
type DashboardSnapshotsList []*DashboardSnapshotDTO
|
||||
|
||||
type GetDashboardSnapshotsQuery struct {
|
||||
Name string
|
||||
Limit int
|
||||
OrgId int64
|
||||
Name string
|
||||
Limit int
|
||||
OrgId int64
|
||||
SignedInUser *SignedInUser
|
||||
|
||||
Result DashboardSnapshotsList
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user