mirror of
https://github.com/grafana/grafana.git
synced 2026-08-11 13:44:59 -05:00
Plugins: Add backend check for app page role access (#78269)
* add backend check for roles * tidy * fix tests * incorporate rbac * fix linter * apply PR feedback * add tests * fix logic * add comment * apply PR feedback
This commit is contained in:
@@ -10,6 +10,12 @@ type FakePluginStore struct {
|
||||
PluginList []Plugin
|
||||
}
|
||||
|
||||
func NewFakePluginStore(ps ...Plugin) *FakePluginStore {
|
||||
return &FakePluginStore{
|
||||
PluginList: ps,
|
||||
}
|
||||
}
|
||||
|
||||
func (pr *FakePluginStore) Plugin(_ context.Context, pluginID string) (Plugin, bool) {
|
||||
for _, v := range pr.PluginList {
|
||||
if v.ID == pluginID {
|
||||
|
||||
Reference in New Issue
Block a user