mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
WIP: get Dashboard Permissions
The guardian class checks if the user is allowed to get the permissions for a dashboard.
This commit is contained in:
@@ -17,16 +17,32 @@ const (
|
||||
|
||||
// Dashboard ACL model
|
||||
type DashboardAcl struct {
|
||||
Id int64
|
||||
OrgId int64
|
||||
DashboardId int64
|
||||
Id int64 `json:"id"`
|
||||
OrgId int64 `json:"-"`
|
||||
DashboardId int64 `json:"dashboardId"`
|
||||
|
||||
Created time.Time
|
||||
Updated time.Time
|
||||
Created time.Time `json:"created"`
|
||||
Updated time.Time `json:"updated"`
|
||||
|
||||
UserId int64
|
||||
UserGroupId int64
|
||||
Permissions PermissionType
|
||||
UserId int64 `json:"userId"`
|
||||
UserGroupId int64 `json:"userGroupId"`
|
||||
Permissions PermissionType `json:"permissions"`
|
||||
}
|
||||
|
||||
type DashboardAclInfoDTO struct {
|
||||
Id int64 `json:"id"`
|
||||
OrgId int64 `json:"-"`
|
||||
DashboardId int64 `json:"dashboardId"`
|
||||
|
||||
Created time.Time `json:"created"`
|
||||
Updated time.Time `json:"updated"`
|
||||
|
||||
UserId int64 `json:"userId"`
|
||||
UserLogin string `json:"userLogin"`
|
||||
UserEmail string `json:"userEmail"`
|
||||
UserGroupId int64 `json:"userGroupId"`
|
||||
UserGroup string `json:"userGroup"`
|
||||
Permissions PermissionType `json:"permissions"`
|
||||
}
|
||||
|
||||
//
|
||||
@@ -54,5 +70,5 @@ type RemoveDashboardPermissionCommand struct {
|
||||
|
||||
type GetDashboardPermissionsQuery struct {
|
||||
DashboardId int64 `json:"dashboardId" binding:"Required"`
|
||||
Result []*DashboardAcl
|
||||
Result []*DashboardAclInfoDTO
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user