MM-52818 - create config setting to enable/disable playbooks product (#23508)

* create config setting to enable/disable playbooks product

* fix to config name

* fix typo

* revert changes to package-lock.json

* update name of test

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
Scott Bishel
2023-06-05 15:18:20 -06:00
committed by GitHub
parent 3705d7af4d
commit 22275fa0f5
7 changed files with 33 additions and 3 deletions

View File

@@ -144,6 +144,8 @@ func GenerateClientConfig(c *model.Config, telemetryID string, license *model.Li
props["AllowSyncedDrafts"] = strconv.FormatBool(*c.ServiceSettings.AllowSyncedDrafts)
props["DelayChannelAutocomplete"] = strconv.FormatBool(*c.ExperimentalSettings.DelayChannelAutocomplete)
props["EnablePlaybooks"] = strconv.FormatBool(*c.ProductSettings.EnablePlaybooks)
if license != nil {
props["ExperimentalEnableAuthenticationTransfer"] = strconv.FormatBool(*c.ServiceSettings.ExperimentalEnableAuthenticationTransfer)

View File

@@ -326,6 +326,20 @@ func TestGetClientConfig(t *testing.T) {
"ExperimentalSharedChannels": "true",
},
},
{
"Default Playbooks Enabled",
&model.Config{
ProductSettings: model.ProductSettings{},
},
"",
&model.License{
Features: &model.Features{},
SkuShortName: "other",
},
map[string]string{
"EnablePlaybooks": "true",
},
},
}
for _, testCase := range testCases {