mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* Extract a helper funtion to perform list with authorization checks * Add k8s verb to utils package * Construct default mapping when no custom mapping is passed * Configure authorization checks for service accounts * Fix helper and add filtering to service accounts
23 lines
796 B
Go
23 lines
796 B
Go
package utils
|
|
|
|
// Kubernetes request verbs
|
|
// http://kubernetes.io/docs/reference/access-authn-authz/authorization/#request-verb-resource
|
|
const (
|
|
// VerbGet is mapped from HTTP GET for individual resource
|
|
VerbGet = "get"
|
|
// VerbList is mapped from HTTP GET for collections
|
|
VerbList = "list"
|
|
// VerbWatch is mapped from HTTP GET for watching an individual resource or collection of resources
|
|
VerbWatch = "watch"
|
|
// VerbCreate is mapped from HTTP POST
|
|
VerbCreate = "create"
|
|
// VerbUpdate is mapped from HTTP PUT
|
|
VerbUpdate = "update"
|
|
// VerbPatch is mapped from HTTP PATCH
|
|
VerbPatch = "patch"
|
|
// VerbDelete is mapped from HTTP DELETE for individual resources
|
|
VerbDelete = "delete"
|
|
// VerbDelete is mapped from HTTP DELETE for collections
|
|
VerbDeleteCollection = "deletecollection"
|
|
)
|