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:
Daniel Lee
2018-02-21 13:39:08 +01:00
parent 3964d6b797
commit 7d9a9fa29c
6 changed files with 223 additions and 16 deletions
+6 -4
View File
@@ -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
}