RBAC: Cover plugin routes (#80578)
* RBAC: Cover plugin routes * Action instead of ReqAction * Fix test initializations * Fix NewPluginProxy call * Duplicate test to add RBAC checks * Cover legacy access control as well * Fix typo * action -> reqAction * Add example Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com> --------- Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
This commit is contained in:
co-authored by
Andres Martinez Gotor
parent
81a49e8016
commit
6b954165c5
@@ -364,6 +364,9 @@ schemas: [{
|
||||
reqSignedIn?: bool
|
||||
reqRole?: string
|
||||
|
||||
// RBAC action the user must have to access the route. i.e. plugin-id.projects:read
|
||||
reqAction?: string
|
||||
|
||||
// For data source plugins. Route headers adds HTTP headers to the
|
||||
// proxied request.
|
||||
headers?: [...#Header]
|
||||
|
||||
@@ -461,7 +461,10 @@ type Route struct {
|
||||
|
||||
// For data source plugins. The route path that is replaced by the
|
||||
// route URL field when proxying the call.
|
||||
Path *string `json:"path,omitempty"`
|
||||
Path *string `json:"path,omitempty"`
|
||||
|
||||
// RBAC action the user must have to access the route. i.e. plugin-id.projects:read
|
||||
ReqAction *string `json:"reqAction,omitempty"`
|
||||
ReqRole *string `json:"reqRole,omitempty"`
|
||||
ReqSignedIn *bool `json:"reqSignedIn,omitempty"`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user