mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
MM-52915 - Remove boards product config setting and system console (#23526)
* Remove boards product config setting and system console * create config setting to enable/disable playbooks product * fix to config name * fix typo * remove lingering ProductSettings references * remove lingering ProductSettings references * revert changes to package-lock.json * Revert "revert changes to package-lock.json" This reverts commit1a7d98ace3
. * revert changes to package-lock.json * fix build issues * another fix * update webap test * i18n-extract * Revert "i18n-extract" This reverts commitc0a98c74ea
. * fix bad i18n-extract * fix bad i18n-extract * fix tests from bad merge * more translation fixes * more translation fixes * updates from self-review --------- Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
parent
1215584665
commit
d0ad46b496
@ -607,7 +607,6 @@ const defaultServerConfig: AdminConfig = {
|
||||
CleanupConfigThresholdDays: -1,
|
||||
},
|
||||
ProductSettings: {
|
||||
EnablePublicSharedBoards: false,
|
||||
EnablePlaybooks: true,
|
||||
},
|
||||
PluginSettings: {
|
||||
|
@ -76,18 +76,6 @@ func TestSetConfiguration(t *testing.T) {
|
||||
assert.Equal(t, "testId", config.TelemetryID)
|
||||
})
|
||||
|
||||
t.Run("test enable shared boards", func(t *testing.T) {
|
||||
baseProductSettings := &model.ProductSettings{
|
||||
EnablePublicSharedBoards: &falseRef,
|
||||
}
|
||||
|
||||
mmConfig := baseConfig
|
||||
mmConfig.ProductSettings = *baseProductSettings
|
||||
mmConfig.ProductSettings.EnablePublicSharedBoards = &boolTrue
|
||||
config := server.CreateBoardsConfig(*mmConfig, "", "")
|
||||
assert.Equal(t, true, config.EnablePublicSharedBoards)
|
||||
})
|
||||
|
||||
t.Run("test boards feature flags", func(t *testing.T) {
|
||||
featureFlags := &model.FeatureFlags{
|
||||
TestFeature: "test",
|
||||
|
@ -58,11 +58,6 @@ func CreateBoardsConfig(mmconfig mm_model.Config, baseURL string, serverID strin
|
||||
enableTelemetry = *mmconfig.LogSettings.EnableDiagnostics
|
||||
}
|
||||
|
||||
enablePublicSharedBoards := false
|
||||
if mmconfig.ProductSettings.EnablePublicSharedBoards != nil {
|
||||
enablePublicSharedBoards = *mmconfig.ProductSettings.EnablePublicSharedBoards
|
||||
}
|
||||
|
||||
enableBoardsDeletion := false
|
||||
if mmconfig.DataRetentionSettings.EnableBoardsDeletion != nil {
|
||||
enableBoardsDeletion = true
|
||||
@ -81,36 +76,35 @@ func CreateBoardsConfig(mmconfig mm_model.Config, baseURL string, serverID strin
|
||||
}
|
||||
|
||||
return &config.Configuration{
|
||||
ServerRoot: baseURL + "/boards",
|
||||
Port: -1,
|
||||
DBType: *mmconfig.SqlSettings.DriverName,
|
||||
DBConfigString: *mmconfig.SqlSettings.DataSource,
|
||||
DBTablePrefix: "focalboard_",
|
||||
UseSSL: false,
|
||||
SecureCookie: true,
|
||||
WebPath: path.Join(*mmconfig.PluginSettings.Directory, "focalboard", "pack"),
|
||||
FilesDriver: *mmconfig.FileSettings.DriverName,
|
||||
FilesPath: *mmconfig.FileSettings.Directory,
|
||||
FilesS3Config: filesS3Config,
|
||||
MaxFileSize: *mmconfig.FileSettings.MaxFileSize,
|
||||
Telemetry: enableTelemetry,
|
||||
TelemetryID: serverID,
|
||||
WebhookUpdate: []string{},
|
||||
SessionExpireTime: 2592000,
|
||||
SessionRefreshTime: 18000,
|
||||
LocalOnly: false,
|
||||
EnableLocalMode: false,
|
||||
LocalModeSocketLocation: "",
|
||||
AuthMode: "mattermost",
|
||||
EnablePublicSharedBoards: enablePublicSharedBoards,
|
||||
FeatureFlags: featureFlags,
|
||||
NotifyFreqCardSeconds: getPluginSettingInt(mmconfig, notifyFreqCardSecondsKey, 120),
|
||||
NotifyFreqBoardSeconds: getPluginSettingInt(mmconfig, notifyFreqBoardSecondsKey, 86400),
|
||||
EnableDataRetention: enableBoardsDeletion,
|
||||
DataRetentionDays: *mmconfig.DataRetentionSettings.BoardsRetentionDays,
|
||||
TeammateNameDisplay: *mmconfig.TeamSettings.TeammateNameDisplay,
|
||||
ShowEmailAddress: showEmailAddress,
|
||||
ShowFullName: showFullName,
|
||||
ServerRoot: baseURL + "/boards",
|
||||
Port: -1,
|
||||
DBType: *mmconfig.SqlSettings.DriverName,
|
||||
DBConfigString: *mmconfig.SqlSettings.DataSource,
|
||||
DBTablePrefix: "focalboard_",
|
||||
UseSSL: false,
|
||||
SecureCookie: true,
|
||||
WebPath: path.Join(*mmconfig.PluginSettings.Directory, "focalboard", "pack"),
|
||||
FilesDriver: *mmconfig.FileSettings.DriverName,
|
||||
FilesPath: *mmconfig.FileSettings.Directory,
|
||||
FilesS3Config: filesS3Config,
|
||||
MaxFileSize: *mmconfig.FileSettings.MaxFileSize,
|
||||
Telemetry: enableTelemetry,
|
||||
TelemetryID: serverID,
|
||||
WebhookUpdate: []string{},
|
||||
SessionExpireTime: 2592000,
|
||||
SessionRefreshTime: 18000,
|
||||
LocalOnly: false,
|
||||
EnableLocalMode: false,
|
||||
LocalModeSocketLocation: "",
|
||||
AuthMode: "mattermost",
|
||||
FeatureFlags: featureFlags,
|
||||
NotifyFreqCardSeconds: getPluginSettingInt(mmconfig, notifyFreqCardSecondsKey, 120),
|
||||
NotifyFreqBoardSeconds: getPluginSettingInt(mmconfig, notifyFreqBoardSecondsKey, 86400),
|
||||
EnableDataRetention: enableBoardsDeletion,
|
||||
DataRetentionDays: *mmconfig.DataRetentionSettings.BoardsRetentionDays,
|
||||
TeammateNameDisplay: *mmconfig.TeamSettings.TeammateNameDisplay,
|
||||
ShowEmailAddress: showEmailAddress,
|
||||
ShowFullName: showFullName,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,9 +85,6 @@ func (b *BoardsService) OnConfigurationChange() error {
|
||||
if mmconfig.PluginSettings.Plugins[PluginName][SharedBoardsName] == true {
|
||||
enableShareBoards = true
|
||||
}
|
||||
if mmconfig.ProductSettings.EnablePublicSharedBoards != nil {
|
||||
enableShareBoards = *mmconfig.ProductSettings.EnablePublicSharedBoards
|
||||
}
|
||||
configuration := &configuration{
|
||||
EnablePublicSharedBoards: enableShareBoards,
|
||||
}
|
||||
|
@ -882,10 +882,6 @@ func (ts *TelemetryService) trackConfig() {
|
||||
"retention_days": *cfg.ExportSettings.RetentionDays,
|
||||
})
|
||||
|
||||
ts.SendTelemetry(TrackConfigProducts, map[string]any{
|
||||
"enable_public_shared_boards": *cfg.ProductSettings.EnablePublicSharedBoards,
|
||||
})
|
||||
|
||||
// Convert feature flags to map[string]any for sending
|
||||
flags := cfg.FeatureFlags.ToMap()
|
||||
interfaceFlags := make(map[string]any)
|
||||
|
@ -2864,18 +2864,10 @@ func (s *CloudSettings) SetDefaults() {
|
||||
}
|
||||
|
||||
type ProductSettings struct {
|
||||
EnablePublicSharedBoards *bool
|
||||
EnablePlaybooks *bool
|
||||
EnablePlaybooks *bool
|
||||
}
|
||||
|
||||
func (s *ProductSettings) SetDefaults(plugins map[string]map[string]any) {
|
||||
if s.EnablePublicSharedBoards == nil {
|
||||
if p, ok := plugins[PluginIdFocalboard]; ok {
|
||||
s.EnablePublicSharedBoards = NewBool(p["enablepublicsharedboards"].(bool))
|
||||
} else {
|
||||
s.EnablePublicSharedBoards = NewBool(false)
|
||||
}
|
||||
}
|
||||
func (s *ProductSettings) SetDefaults() {
|
||||
if s.EnablePlaybooks == nil {
|
||||
s.EnablePlaybooks = NewBool(true)
|
||||
}
|
||||
@ -3360,7 +3352,7 @@ func (o *Config) SetDefaults() {
|
||||
o.ThemeSettings.SetDefaults()
|
||||
o.ClusterSettings.SetDefaults()
|
||||
o.PluginSettings.SetDefaults(o.LogSettings)
|
||||
o.ProductSettings.SetDefaults(o.PluginSettings.Plugins)
|
||||
o.ProductSettings.SetDefaults()
|
||||
o.AnalyticsSettings.SetDefaults()
|
||||
o.ComplianceSettings.SetDefaults()
|
||||
o.LocalizationSettings.SetDefaults()
|
||||
|
@ -6,7 +6,7 @@
|
||||
import React from 'react';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
|
||||
import {AccountMultipleOutlineIcon, ChartBarIcon, CogOutlineIcon, CreditCardOutlineIcon, FlaskOutlineIcon, FormatListBulletedIcon, InformationOutlineIcon, PowerPlugOutlineIcon, ServerVariantIcon, ShieldOutlineIcon, SitemapIcon, ProductsIcon} from '@mattermost/compass-icons/components';
|
||||
import {AccountMultipleOutlineIcon, ChartBarIcon, CogOutlineIcon, CreditCardOutlineIcon, FlaskOutlineIcon, FormatListBulletedIcon, InformationOutlineIcon, PowerPlugOutlineIcon, ServerVariantIcon, ShieldOutlineIcon, SitemapIcon} from '@mattermost/compass-icons/components';
|
||||
|
||||
import {RESOURCE_KEYS} from 'mattermost-redux/constants/permissions_sysconsole';
|
||||
|
||||
@ -5862,42 +5862,6 @@ const AdminDefinition = {
|
||||
},
|
||||
},
|
||||
},
|
||||
products: {
|
||||
icon: (
|
||||
<ProductsIcon
|
||||
size={16}
|
||||
className={'category-icon fa'}
|
||||
color={'currentColor'}
|
||||
/>
|
||||
),
|
||||
sectionTitle: t('admin.sidebar.products'),
|
||||
sectionTitleDefault: 'Products',
|
||||
isHidden: it.any(
|
||||
it.not(it.userHasReadPermissionOnSomeResources(RESOURCE_KEYS.PRODUCTS)),
|
||||
),
|
||||
boards: {
|
||||
url: 'products/boards',
|
||||
title: t('admin.sidebar.boards'),
|
||||
title_default: 'Boards',
|
||||
isHidden: it.not(it.userHasReadPermissionOnResource(RESOURCE_KEYS.PRODUCTS.BOARDS)),
|
||||
schema: {
|
||||
id: 'BoardsSettings',
|
||||
name: t('admin.site.boards'),
|
||||
name_default: 'Boards',
|
||||
settings: [
|
||||
{
|
||||
type: Constants.SettingsTypes.TYPE_BOOL,
|
||||
key: 'ProductSettings.EnablePublicSharedBoards',
|
||||
label: t('admin.customization.enablePublicSharedBoardsTitle'),
|
||||
label_default: 'Enable Public Shared Boards:',
|
||||
help_text: t('admin.customization.enablePublicSharedBoardsDesc'),
|
||||
help_text_default: 'This allows board editors to share boards that can be accessed by anyone with the link.',
|
||||
isDisabled: it.not(it.userHasWritePermissionOnResource(RESOURCE_KEYS.PRODUCTS.BOARDS)),
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
integrations: {
|
||||
icon: (
|
||||
<SitemapIcon
|
||||
|
@ -1072,37 +1072,6 @@ exports[`components/AdminSidebar should match snapshot 1`] = `
|
||||
title="Plugin 0"
|
||||
/>
|
||||
</AdminSidebarCategory>
|
||||
<AdminSidebarCategory
|
||||
definitionKey="products"
|
||||
icon={
|
||||
<ProductsIcon
|
||||
className="category-icon fa"
|
||||
color="currentColor"
|
||||
size={16}
|
||||
/>
|
||||
}
|
||||
key="products"
|
||||
parentLink="/admin_console"
|
||||
sectionClass=""
|
||||
title={
|
||||
<Memo(MemoizedFormattedMessage)
|
||||
defaultMessage="Products"
|
||||
id="admin.sidebar.products"
|
||||
/>
|
||||
}
|
||||
>
|
||||
<AdminSidebarSection
|
||||
definitionKey="products.boards"
|
||||
key="products.boards"
|
||||
name="products/boards"
|
||||
title={
|
||||
<Memo(MemoizedFormattedMessage)
|
||||
defaultMessage="Boards"
|
||||
id="admin.sidebar.boards"
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</AdminSidebarCategory>
|
||||
<AdminSidebarCategory
|
||||
definitionKey="integrations"
|
||||
icon={
|
||||
@ -1806,37 +1775,6 @@ exports[`components/AdminSidebar should match snapshot with workspace optimizati
|
||||
title="Plugin 0"
|
||||
/>
|
||||
</AdminSidebarCategory>
|
||||
<AdminSidebarCategory
|
||||
definitionKey="products"
|
||||
icon={
|
||||
<ProductsIcon
|
||||
className="category-icon fa"
|
||||
color="currentColor"
|
||||
size={16}
|
||||
/>
|
||||
}
|
||||
key="products"
|
||||
parentLink="/admin_console"
|
||||
sectionClass=""
|
||||
title={
|
||||
<Memo(MemoizedFormattedMessage)
|
||||
defaultMessage="Products"
|
||||
id="admin.sidebar.products"
|
||||
/>
|
||||
}
|
||||
>
|
||||
<AdminSidebarSection
|
||||
definitionKey="products.boards"
|
||||
key="products.boards"
|
||||
name="products/boards"
|
||||
title={
|
||||
<Memo(MemoizedFormattedMessage)
|
||||
defaultMessage="Boards"
|
||||
id="admin.sidebar.boards"
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</AdminSidebarCategory>
|
||||
<AdminSidebarCategory
|
||||
definitionKey="integrations"
|
||||
icon={
|
||||
@ -2595,37 +2533,6 @@ exports[`components/AdminSidebar should match snapshot, not prevent the console
|
||||
title="Plugin 0"
|
||||
/>
|
||||
</AdminSidebarCategory>
|
||||
<AdminSidebarCategory
|
||||
definitionKey="products"
|
||||
icon={
|
||||
<ProductsIcon
|
||||
className="category-icon fa"
|
||||
color="currentColor"
|
||||
size={16}
|
||||
/>
|
||||
}
|
||||
key="products"
|
||||
parentLink="/admin_console"
|
||||
sectionClass=""
|
||||
title={
|
||||
<Memo(MemoizedFormattedMessage)
|
||||
defaultMessage="Products"
|
||||
id="admin.sidebar.products"
|
||||
/>
|
||||
}
|
||||
>
|
||||
<AdminSidebarSection
|
||||
definitionKey="products.boards"
|
||||
key="products.boards"
|
||||
name="products/boards"
|
||||
title={
|
||||
<Memo(MemoizedFormattedMessage)
|
||||
defaultMessage="Boards"
|
||||
id="admin.sidebar.boards"
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</AdminSidebarCategory>
|
||||
<AdminSidebarCategory
|
||||
definitionKey="integrations"
|
||||
icon={
|
||||
@ -3329,37 +3236,6 @@ exports[`components/AdminSidebar should match snapshot, render plugins without a
|
||||
title="Plugin 0"
|
||||
/>
|
||||
</AdminSidebarCategory>
|
||||
<AdminSidebarCategory
|
||||
definitionKey="products"
|
||||
icon={
|
||||
<ProductsIcon
|
||||
className="category-icon fa"
|
||||
color="currentColor"
|
||||
size={16}
|
||||
/>
|
||||
}
|
||||
key="products"
|
||||
parentLink="/admin_console"
|
||||
sectionClass=""
|
||||
title={
|
||||
<Memo(MemoizedFormattedMessage)
|
||||
defaultMessage="Products"
|
||||
id="admin.sidebar.products"
|
||||
/>
|
||||
}
|
||||
>
|
||||
<AdminSidebarSection
|
||||
definitionKey="products.boards"
|
||||
key="products.boards"
|
||||
name="products/boards"
|
||||
title={
|
||||
<Memo(MemoizedFormattedMessage)
|
||||
defaultMessage="Boards"
|
||||
id="admin.sidebar.boards"
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</AdminSidebarCategory>
|
||||
<AdminSidebarCategory
|
||||
definitionKey="integrations"
|
||||
icon={
|
||||
@ -4162,37 +4038,6 @@ exports[`components/AdminSidebar should match snapshot, with license (with all f
|
||||
title="Plugin 0"
|
||||
/>
|
||||
</AdminSidebarCategory>
|
||||
<AdminSidebarCategory
|
||||
definitionKey="products"
|
||||
icon={
|
||||
<ProductsIcon
|
||||
className="category-icon fa"
|
||||
color="currentColor"
|
||||
size={16}
|
||||
/>
|
||||
}
|
||||
key="products"
|
||||
parentLink="/admin_console"
|
||||
sectionClass=""
|
||||
title={
|
||||
<Memo(MemoizedFormattedMessage)
|
||||
defaultMessage="Products"
|
||||
id="admin.sidebar.products"
|
||||
/>
|
||||
}
|
||||
>
|
||||
<AdminSidebarSection
|
||||
definitionKey="products.boards"
|
||||
key="products.boards"
|
||||
name="products/boards"
|
||||
title={
|
||||
<Memo(MemoizedFormattedMessage)
|
||||
defaultMessage="Boards"
|
||||
id="admin.sidebar.boards"
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</AdminSidebarCategory>
|
||||
<AdminSidebarCategory
|
||||
definitionKey="integrations"
|
||||
icon={
|
||||
@ -5128,37 +4973,6 @@ exports[`components/AdminSidebar should match snapshot, with license (without an
|
||||
title="Plugin 0"
|
||||
/>
|
||||
</AdminSidebarCategory>
|
||||
<AdminSidebarCategory
|
||||
definitionKey="products"
|
||||
icon={
|
||||
<ProductsIcon
|
||||
className="category-icon fa"
|
||||
color="currentColor"
|
||||
size={16}
|
||||
/>
|
||||
}
|
||||
key="products"
|
||||
parentLink="/admin_console"
|
||||
sectionClass=""
|
||||
title={
|
||||
<Memo(MemoizedFormattedMessage)
|
||||
defaultMessage="Products"
|
||||
id="admin.sidebar.products"
|
||||
/>
|
||||
}
|
||||
>
|
||||
<AdminSidebarSection
|
||||
definitionKey="products.boards"
|
||||
key="products.boards"
|
||||
name="products/boards"
|
||||
title={
|
||||
<Memo(MemoizedFormattedMessage)
|
||||
defaultMessage="Boards"
|
||||
id="admin.sidebar.boards"
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</AdminSidebarCategory>
|
||||
<AdminSidebarCategory
|
||||
definitionKey="integrations"
|
||||
icon={
|
||||
|
@ -670,8 +670,6 @@
|
||||
"admin.customization.enableLinkPreviewsTitle": "Enable website link previews:",
|
||||
"admin.customization.enablePermalinkPreviewsDesc": "When enabled, links to Mattermost messages will generate a preview for any users that have access to the original message. Please review our <link>documentation</link> for details.",
|
||||
"admin.customization.enablePermalinkPreviewsTitle": "Enable message link previews:",
|
||||
"admin.customization.enablePublicSharedBoardsDesc": "This allows board editors to share boards that can be accessed by anyone with the link.",
|
||||
"admin.customization.enablePublicSharedBoardsTitle": "Enable Publicly-Shared Boards:",
|
||||
"admin.customization.enableSVGsDesc": "Enable previews for SVG file attachments and allow them to appear in messages.\n\nEnabling SVGs is not recommended in environments where not all users are trusted.",
|
||||
"admin.customization.enableSVGsTitle": "Enable SVGs:",
|
||||
"admin.customization.gfycatApiKey": "Gfycat API Key:",
|
||||
@ -2250,7 +2248,6 @@
|
||||
"admin.sidebar.billing": "Billing & Account",
|
||||
"admin.sidebar.billing_history": "Billing History",
|
||||
"admin.sidebar.blevesearch": "Bleve",
|
||||
"admin.sidebar.boards": "Boards",
|
||||
"admin.sidebar.channels": "Channels",
|
||||
"admin.sidebar.company_info": "Company Information",
|
||||
"admin.sidebar.compliance": "Compliance",
|
||||
@ -2295,7 +2292,6 @@
|
||||
"admin.sidebar.permissions": "Permissions",
|
||||
"admin.sidebar.plugins": "Plugins",
|
||||
"admin.sidebar.posts": "Posts",
|
||||
"admin.sidebar.products": "Products",
|
||||
"admin.sidebar.publicLinks": "Public Links",
|
||||
"admin.sidebar.pushNotificationServer": "Push Notification Server",
|
||||
"admin.sidebar.rateLimiting": "Rate Limiting",
|
||||
@ -2318,7 +2314,6 @@
|
||||
"admin.sidebar.workspaceOptimization": "Workspace Optimization",
|
||||
"admin.sidebarHeader.systemConsole": "System Console",
|
||||
"admin.site.announcementBanner": "Announcement Banner",
|
||||
"admin.site.boards": "Boards",
|
||||
"admin.site.customization": "Customization",
|
||||
"admin.site.emoji": "Emoji",
|
||||
"admin.site.fileSharingDownloads": "File Sharing and Downloads",
|
||||
|
@ -93,7 +93,6 @@ export function adminDefinitionsToUrlsAndTexts(adminDefinition: typeof AdminDefi
|
||||
adminDefinition.integrations,
|
||||
adminDefinition.compliance,
|
||||
adminDefinition.experimental,
|
||||
adminDefinition.products,
|
||||
adminDefinition.billing,
|
||||
];
|
||||
for (const section of sections) {
|
||||
|
@ -820,7 +820,6 @@ export type JobSettings = {
|
||||
};
|
||||
|
||||
export type ProductSettings = {
|
||||
EnablePublicSharedBoards: boolean;
|
||||
EnablePlaybooks: boolean;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user