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:
@@ -15,7 +15,8 @@ import (
|
||||
|
||||
type AppPlugin struct {
|
||||
FrontendPluginBase
|
||||
Routes []*AppPluginRoute `json:"routes"`
|
||||
Routes []*AppPluginRoute `json:"routes"`
|
||||
AutoEnabled bool `json:"autoEnabled"`
|
||||
|
||||
FoundChildPlugins []*PluginInclude `json:"-"`
|
||||
Pinned bool `json:"-"`
|
||||
|
||||
@@ -30,9 +30,10 @@ func GetPluginSettings(orgId int64) (map[string]*models.PluginSettingInfoDTO, er
|
||||
Enabled: true,
|
||||
}
|
||||
|
||||
// apps are disabled by default
|
||||
if pluginDef.Type == PluginTypeApp {
|
||||
opt.Enabled = false
|
||||
// apps are disabled by default unless autoEnabled: true
|
||||
if app, exists := Apps[pluginDef.Id]; exists {
|
||||
opt.Enabled = app.AutoEnabled
|
||||
opt.Pinned = app.AutoEnabled
|
||||
}
|
||||
|
||||
// if it's included in app check app settings
|
||||
|
||||
Reference in New Issue
Block a user