mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 10:12:11 +08:00
RBAC: Default to plugins.app:access for plugin includes (#90969)
* Default to app access for includes * Check plugin type
This commit is contained in:
@ -175,6 +175,11 @@ func ReadPluginJSON(reader io.Reader) (JSONData, error) {
|
||||
if include.Role == "" {
|
||||
include.Role = org.RoleViewer
|
||||
}
|
||||
|
||||
// Default to app access for app plugins
|
||||
if plugin.Type == TypeApp && include.Role == org.RoleViewer && include.Action == "" {
|
||||
include.Action = ActionAppAccess
|
||||
}
|
||||
}
|
||||
|
||||
return plugin, nil
|
||||
|
Reference in New Issue
Block a user