mirror of
https://github.com/grafana/grafana.git
synced 2024-11-30 20:54:22 -06:00
4a3961400a
* WIP * wip * wip * wip * refactor: new return of the create service accoutn * refactor: change to have correct role * refactor: ability to create service accounts * make public * refactor: make ints instead * refactor: remove location sprintf * refactor: added back named constants
27 lines
654 B
Go
27 lines
654 B
Go
package serviceaccounts
|
|
|
|
import "github.com/grafana/grafana/pkg/services/accesscontrol"
|
|
|
|
var (
|
|
ScopeAll = "serviceaccounts:*"
|
|
ScopeID = accesscontrol.Scope("serviceaccounts", "id", accesscontrol.Parameter(":serviceaccountId"))
|
|
)
|
|
|
|
const (
|
|
ActionRead = "serviceaccounts:read"
|
|
ActionWrite = "serviceaccounts:write"
|
|
ActionCreate = "serviceaccounts:create"
|
|
ActionDelete = "serviceaccounts:delete"
|
|
)
|
|
|
|
type ServiceAccount struct {
|
|
Id int64
|
|
}
|
|
|
|
type CreateServiceaccountForm struct {
|
|
OrgID int64 `json:"-"`
|
|
Name string `json:"name" binding:"Required"`
|
|
DisplayName string `json:"displayName"`
|
|
Description string `json:"description"`
|
|
}
|