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:
Daniel Lee
2017-05-08 15:35:34 +02:00
parent 074ef7ce4e
commit f1e1da39e3
12 changed files with 176 additions and 26 deletions

View File

@@ -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
}