AppPlugins: Options to disable showing config page in nav (#31354)

* AppPlugins: Options to disable showing config page in nav

* rename

* Added autoEnabled

* updated

* Things are working sort of

* Simplify
This commit is contained in:
Torkel Ödegaard
2021-02-25 10:00:21 +01:00
committed by GitHub
parent df3d84f161
commit 584886fa46
8 changed files with 19 additions and 13 deletions

View File

@ -169,6 +169,11 @@ func GetPluginSettingByID(c *models.ReqContext) response.Response {
SignatureOrg: def.SignatureOrg,
}
if app, ok := plugins.Apps[def.Id]; ok {
dto.Enabled = app.AutoEnabled
dto.Pinned = app.AutoEnabled
}
query := models.GetPluginSettingByIdQuery{PluginId: pluginID, OrgId: c.OrgId}
if err := bus.Dispatch(&query); err != nil {
if !errors.Is(err, models.ErrPluginSettingNotFound) {