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:
Will Browne
2023-12-18 16:12:46 +01:00
committed by GitHub
parent 68189cdaeb
commit 0b511aaace
4 changed files with 245 additions and 2 deletions
@@ -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 {