2017-06-22 07:02:03 +08:00
|
|
|
package dtos
|
|
|
|
|
2022-08-10 17:56:48 +08:00
|
|
|
import (
|
2023-11-22 21:20:22 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/dashboards/dashboardaccess"
|
2022-08-10 17:56:48 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/org"
|
|
|
|
)
|
2017-06-22 07:02:03 +08:00
|
|
|
|
2022-02-08 20:38:43 +08:00
|
|
|
// swagger:model
|
2022-07-18 21:14:58 +08:00
|
|
|
type UpdateDashboardACLCommand struct {
|
|
|
|
Items []DashboardACLUpdateItem `json:"items"`
|
2017-06-22 07:02:03 +08:00
|
|
|
}
|
|
|
|
|
2022-02-08 20:38:43 +08:00
|
|
|
// swagger:model
|
2022-07-18 21:14:58 +08:00
|
|
|
type DashboardACLUpdateItem struct {
|
2022-08-10 17:56:48 +08:00
|
|
|
UserID int64 `json:"userId"`
|
|
|
|
TeamID int64 `json:"teamId"`
|
|
|
|
Role *org.RoleType `json:"role,omitempty"`
|
2022-02-08 20:38:43 +08:00
|
|
|
// Permission level
|
|
|
|
// Description:
|
|
|
|
// * `1` - View
|
|
|
|
// * `2` - Edit
|
|
|
|
// * `4` - Admin
|
|
|
|
// Enum: 1,2,4
|
2023-11-22 21:20:22 +08:00
|
|
|
Permission dashboardaccess.PermissionType `json:"permission"`
|
2017-06-22 07:02:03 +08:00
|
|
|
}
|