[MM-62066] Allow using plugin settings defined in manifest as fallback when using custom sections and plugin is disabled (#29500)
* Allow using plugin settings defined in manifest as fallback when using custom sections and plugin is disabled * Update server/public/model/manifest.go Co-authored-by: Christopher Poile <cpoile@gmail.com> * Add custom setting case --------- Co-authored-by: Christopher Poile <cpoile@gmail.com> Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
e1a582395f
Коммит
086e6d9df6
@@ -116,6 +116,9 @@ type PluginSettingsSection struct {
|
||||
|
||||
// If true, the section will load the custom component registered using `registry.registerAdminConsoleCustomSection`
|
||||
Custom bool `json:"custom" yaml:"custom"`
|
||||
|
||||
// If true and Custom = true, the settings defined under this section will still render as fallback (unless the individual setting is type 'custom') when the plugin is disabled.
|
||||
Fallback bool `json:"fallback" yaml:"fallback"`
|
||||
}
|
||||
|
||||
type PluginSettingsSchema struct {
|
||||
|
||||
@@ -95,6 +95,18 @@ func TestIsValid(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Key: "section3",
|
||||
Custom: true,
|
||||
Fallback: true,
|
||||
Settings: []*PluginSetting{
|
||||
{
|
||||
Key: "section3setting1",
|
||||
DisplayName: "thedisplayname",
|
||||
Type: "custom",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}, false},
|
||||
|
||||
Ссылка в новой задаче
Block a user