RBAC: Cover plugin includes (#57582)

* RBAC: Add action to plugin includes

* Adding the feature toggle check

* Cue update

* Extract include access control to method

* Suggestion to prevent log when RBAC is disabled

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>

* Rename IsRBACReady to RequireRBACAction

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
This commit is contained in:
Gabriel MABILLE
2022-11-16 15:54:04 +01:00
committed by GitHub
co-authored by ievaVasiljeva
parent bce83485a9
commit a8c48b6801
4 changed files with 32 additions and 3 deletions
+4 -1
View File
@@ -88,6 +88,9 @@ seqs: [
component?: string
role?: "Admin" | "Editor" | "Viewer"
// RBAC action the user must have to access the route
action?: string
// Used for app plugins.
path?: string
@@ -163,7 +166,7 @@ seqs: [
permissions: [...#Permission]
}
// Permission describes an RBAC permission on the plugin. A permission has an action and an option
// Permission describes an RBAC permission on the plugin. A permission has an action and an optional
// scope.
// Example: action: 'test-app.schedules:read', scope: 'test-app.schedules:*'
#Permission: {