[MM-47145] My Insights license change (#21443)

* tools updates

* Revert "tools updates"

This reverts commit 6293297b55803c5a263e200ebd80192899666ae9.

* remove license checks for my insights endpoints

* removing new config

* remove license checks from insights test

* adding some license tests for team endpoints

* fixing tests

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MBP.ht.home>
Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MBP.fritz.box>
Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.fritz.box>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Ben Cooke
2022-11-18 11:29:06 -05:00
коммит произвёл GitHub
родитель 2386571c89
Коммит 25bb1d0ebd
4 изменённых файлов: 52 добавлений и 47 удалений

Просмотреть файл

@@ -130,7 +130,7 @@ func GenerateClientConfig(c *model.Config, telemetryID string, license *model.Li
props["ExperimentalSharedChannels"] = "false"
props["CollapsedThreads"] = *c.ServiceSettings.CollapsedThreads
props["EnableCustomGroups"] = "false"
props["InsightsEnabled"] = "false"
props["InsightsEnabled"] = strconv.FormatBool(c.FeatureFlags.InsightsEnabled)
props["PostPriority"] = strconv.FormatBool(*c.ServiceSettings.PostPriority)
if license != nil {
@@ -206,10 +206,6 @@ func GenerateClientConfig(c *model.Config, telemetryID string, license *model.Li
if license.SkuShortName == model.LicenseShortSkuProfessional || license.SkuShortName == model.LicenseShortSkuEnterprise {
props["EnableCustomGroups"] = strconv.FormatBool(*c.ServiceSettings.EnableCustomGroups)
}
if (license.SkuShortName == model.LicenseShortSkuProfessional || license.SkuShortName == model.LicenseShortSkuEnterprise) && c.FeatureFlags.InsightsEnabled {
props["InsightsEnabled"] = "true"
}
}
return props

Просмотреть файл

@@ -195,7 +195,7 @@ func TestGetClientConfig(t *testing.T) {
SkuShortName: "other",
},
map[string]string{
"InsightsEnabled": "false",
"InsightsEnabled": "true",
},
},
{