Remove dead Email login button color settings (#38021)

* [MM-57557] Remove dead Email login button color settings from the server

EmailSettings.LoginButtonColor, LoginButtonBorderColor and LoginButtonTextColor
were plumbed into the client config as EmailLoginButtonColor /
EmailLoginButtonBorderColor / EmailLoginButtonTextColor, but no client — web or
mobile — ever consumed them, so the email login button was never colored by
these values.

Remove the fields from the config struct and its defaults, drop the three client
config props, and update the config fixtures that carried them.

Also fixes MM-57556 and MM-57804, and follows the same removal already done for
the AD/LDAP (MM-70140) and SAML (MM-70141) equivalents.

* [MM-57557] Remove Email login button colors from the webapp and docs

Drop the three Email Login Button Color settings from the Admin Console
Experimental Features section along with their en.json strings, remove the
matching ClientConfig and AdminConfig EmailSettings entries to stay in sync with
the server model, and delete the corresponding documentation entries.

The experimental settings doc's jq example referenced
EmailSettings.LoginButtonColor, which no longer exists; point it at
EmailSettings.EmailBatchingBufferSize instead.
This commit is contained in:
Jesse Hallam
2026-08-18 18:36:03 -03:00
committed by GitHub
parent 0bff02c814
commit 925a09a5f2
11 changed files with 6 additions and 121 deletions
@@ -13,10 +13,10 @@ Review and manage the following [experimental](/administration-guide/manage/feat
<Tip>
System admins managing a self-hosted Mattermost deployment can edit the `config.json` file as described in the following tables. Each configuration value below includes a JSON path to access the value programmatically in the `config.json` file using a JSON-aware tool. For example, one `LoginButtonColor` value is under `EmailSettings`.
System admins managing a self-hosted Mattermost deployment can edit the `config.json` file as described in the following tables. Each configuration value below includes a JSON path to access the value programmatically in the `config.json` file using a JSON-aware tool. For example, the `EmailBatchingBufferSize` value is under `EmailSettings`.
- If using a tool such as [jq](https://stedolan.github.io/jq/), you'd enter: `cat config/config.json | jq '.EmailSettings.LoginButtonColor'`
- When working with the `config.json` file manually, look for an object such as `EmailSettings`, then within that object, find the key `LoginButtonColor`.
- If using a tool such as [jq](https://stedolan.github.io/jq/), you'd enter: `cat config/config.json | jq '.EmailSettings.EmailBatchingBufferSize'`
- When working with the `config.json` file manually, look for an object such as `EmailSettings`, then within that object, find the key `EmailBatchingBufferSize`.
</Tip>
@@ -101,51 +101,6 @@ Specify the maximum frequency, in seconds, which the batching job checks for new
</tbody>
</table>
### Email login button color
Specify the color of the email login button for white labeling purposes. Use a hex code with a \#-sign before the code. This setting only applies to the mobile app.
<table>
<colgroup>
<col style={{width: '100%'}} />
</colgroup>
<tbody>
<tr>
<td>This feature's <code>config.json</code> setting is <code>"LoginButtonColor": ""</code> with string input.</td>
</tr>
</tbody>
</table>
### Email login button border color
Specify the color of the email login button border for white labeling purposes. Use a hex code with a \#-sign before the code. This setting only applies to the mobile app.
<table>
<colgroup>
<col style={{width: '100%'}} />
</colgroup>
<tbody>
<tr>
<td>This feature's <code>config.json</code> setting is <code>"LoginButtonBorderColor": ""</code> with string input.</td>
</tr>
</tbody>
</table>
### Email login button text color
Specify the color of the email login button text for white labeling purposes. Use a hex code with a \#-sign before the code. This setting only applies to the mobile app.
<table>
<colgroup>
<col style={{width: '100%'}} />
</colgroup>
<tbody>
<tr>
<td>This feature's <code>config.json</code> setting is <code>"LoginButtonTextColor": ""</code> with string input.</td>
</tr>
</tbody>
</table>
### Enable account deactivation
**True**: Ability for users to deactivate their own account from **Settings \> Advanced \> Deactivate Account**. If a user deactivates their own account, they will get an email notification confirming they were deactivated. Available only when authentication is set to use email/password. Not available when authentication uses SAML or AD/LDAP.
@@ -175,10 +175,7 @@
"EmailBatchingInterval": 30,
"EnablePreviewModeBanner": true,
"SkipServerCertificateVerification": false,
"EmailNotificationContentsType": "full",
"LoginButtonColor": "#0000",
"LoginButtonBorderColor": "#2389D7",
"LoginButtonTextColor": "#2389D7"
"EmailNotificationContentsType": "full"
},
"PrivacySettings": {
"ShowEmailAddress": true,
@@ -257,10 +257,7 @@
"EmailBatchingInterval": 30,
"EnablePreviewModeBanner": true,
"SkipServerCertificateVerification": false,
"EmailNotificationContentsType": "full",
"LoginButtonColor": "#0000",
"LoginButtonBorderColor": "#2389D7",
"LoginButtonTextColor": "#2389D7"
"EmailNotificationContentsType": "full"
},
"RateLimitSettings": {
"Enable": false,
@@ -405,9 +405,6 @@ const defaultServerConfig: AdminConfig = {
EnablePreviewModeBanner: true,
SkipServerCertificateVerification: false,
EmailNotificationContentsType: 'full',
LoginButtonColor: '#0000',
LoginButtonBorderColor: '#2389D7',
LoginButtonTextColor: '#2389D7',
},
RateLimitSettings: {
Enable: false,
-3
View File
@@ -469,9 +469,6 @@ func TestMailServiceConfig(t *testing.T) {
EnablePreviewModeBanner: new(bool),
SkipServerCertificateVerification: new(bool),
EmailNotificationContentsType: new(string),
LoginButtonColor: new(string),
LoginButtonBorderColor: new(string),
LoginButtonTextColor: new(string),
},
}
},
-4
View File
@@ -322,10 +322,6 @@ func GenerateLimitedClientConfig(c *model.Config, telemetryID string, license *m
props["EnableSignInWithEmail"] = strconv.FormatBool(*c.EmailSettings.EnableSignInWithEmail)
props["EnableSignInWithUsername"] = strconv.FormatBool(*c.EmailSettings.EnableSignInWithUsername)
props["EmailLoginButtonColor"] = *c.EmailSettings.LoginButtonColor
props["EmailLoginButtonBorderColor"] = *c.EmailSettings.LoginButtonBorderColor
props["EmailLoginButtonTextColor"] = *c.EmailSettings.LoginButtonTextColor
props["TermsOfServiceLink"] = *c.SupportSettings.TermsOfServiceLink
props["PrivacyPolicyLink"] = *c.SupportSettings.PrivacyPolicyLink
props["AboutLink"] = *c.SupportSettings.AboutLink
-15
View File
@@ -2164,9 +2164,6 @@ type EmailSettings struct {
EnablePreviewModeBanner *bool `access:"site_notifications"`
SkipServerCertificateVerification *bool `access:"environment_smtp,write_restrictable,cloud_restrictable"`
EmailNotificationContentsType *string `access:"site_notifications"`
LoginButtonColor *string `access:"experimental_features"`
LoginButtonBorderColor *string `access:"experimental_features"`
LoginButtonTextColor *string `access:"experimental_features"`
}
func (s *EmailSettings) SetDefaults(isUpdate bool) {
@@ -2297,18 +2294,6 @@ func (s *EmailSettings) SetDefaults(isUpdate bool) {
if s.EmailNotificationContentsType == nil {
s.EmailNotificationContentsType = new(EmailNotificationContentsFull)
}
if s.LoginButtonColor == nil {
s.LoginButtonColor = new("#0000")
}
if s.LoginButtonBorderColor == nil {
s.LoginButtonBorderColor = new("#2389D7")
}
if s.LoginButtonTextColor == nil {
s.LoginButtonTextColor = new("#2389D7")
}
}
type RateLimitSettings struct {
+1 -4
View File
@@ -164,10 +164,7 @@
"EmailBatchingInterval": 30,
"EnablePreviewModeBanner": true,
"SkipServerCertificateVerification": false,
"EmailNotificationContentsType": "full",
"LoginButtonColor": "",
"LoginButtonBorderColor": "",
"LoginButtonTextColor": ""
"EmailNotificationContentsType": "full"
},
"RateLimitSettings": {
"Enable": false,
@@ -6548,30 +6548,6 @@ const AdminDefinition: AdminDefinitionType = {
placeholder: defineMessage({id: 'admin.experimental.emailBatchingInterval.example', defaultMessage: 'E.g.: "30"'}),
isDisabled: it.not(it.userHasWritePermissionOnResource(RESOURCE_KEYS.EXPERIMENTAL.FEATURES)),
},
{
type: 'color',
key: 'EmailSettings.LoginButtonColor',
label: defineMessage({id: 'admin.experimental.emailSettingsLoginButtonColor.title', defaultMessage: 'Email Login Button Color:'}),
help_text: defineMessage({id: 'admin.experimental.emailSettingsLoginButtonColor.desc', defaultMessage: 'Specify the color of the email login button for white labeling purposes. Use a hex code with a #-sign before the code. This setting only applies to the mobile apps.'}),
help_text_markdown: false,
isDisabled: it.not(it.userHasWritePermissionOnResource(RESOURCE_KEYS.EXPERIMENTAL.FEATURES)),
},
{
type: 'color',
key: 'EmailSettings.LoginButtonBorderColor',
label: defineMessage({id: 'admin.experimental.emailSettingsLoginButtonBorderColor.title', defaultMessage: 'Email Login Button Border Color:'}),
help_text: defineMessage({id: 'admin.experimental.emailSettingsLoginButtonBorderColor.desc', defaultMessage: 'Specify the color of the email login button border for white labeling purposes. Use a hex code with a #-sign before the code. This setting only applies to the mobile apps.'}),
help_text_markdown: false,
isDisabled: it.not(it.userHasWritePermissionOnResource(RESOURCE_KEYS.EXPERIMENTAL.FEATURES)),
},
{
type: 'color',
key: 'EmailSettings.LoginButtonTextColor',
label: defineMessage({id: 'admin.experimental.emailSettingsLoginButtonTextColor.title', defaultMessage: 'Email Login Button Text Color:'}),
help_text: defineMessage({id: 'admin.experimental.emailSettingsLoginButtonTextColor.desc', defaultMessage: 'Specify the color of the email login button text for white labeling purposes. Use a hex code with a #-sign before the code. This setting only applies to the mobile apps.'}),
help_text_markdown: false,
isDisabled: it.not(it.userHasWritePermissionOnResource(RESOURCE_KEYS.EXPERIMENTAL.FEATURES)),
},
{
type: 'bool',
key: 'TeamSettings.EnableUserDeactivation',
-6
View File
@@ -1322,12 +1322,6 @@
"admin.experimental.emailBatchingInterval.desc": "Specify the maximum frequency, in seconds, which the batching job checks for new notifications. Longer batching intervals will increase performance.",
"admin.experimental.emailBatchingInterval.example": "E.g.: \"30\"",
"admin.experimental.emailBatchingInterval.title": "Email Batching Interval:",
"admin.experimental.emailSettingsLoginButtonBorderColor.desc": "Specify the color of the email login button border for white labeling purposes. Use a hex code with a #-sign before the code. This setting only applies to the mobile apps.",
"admin.experimental.emailSettingsLoginButtonBorderColor.title": "Email Login Button Border Color:",
"admin.experimental.emailSettingsLoginButtonColor.desc": "Specify the color of the email login button for white labeling purposes. Use a hex code with a #-sign before the code. This setting only applies to the mobile apps.",
"admin.experimental.emailSettingsLoginButtonColor.title": "Email Login Button Color:",
"admin.experimental.emailSettingsLoginButtonTextColor.desc": "Specify the color of the email login button text for white labeling purposes. Use a hex code with a #-sign before the code. This setting only applies to the mobile apps.",
"admin.experimental.emailSettingsLoginButtonTextColor.title": "Email Login Button Text Color:",
"admin.experimental.enableChannelViewedMessages.desc": "This setting determines whether `channel_viewed` WebSocket events are sent, which synchronize unread notifications across clients and devices. Disabling the setting in larger deployments may improve server performance.",
"admin.experimental.enableChannelViewedMessages.title": "Enable Channel Viewed WebSocket Messages:",
"admin.experimental.enableOnboardingFlow.desc": "When true, new users are shown steps to complete as part of an onboarding process",
-6
View File
@@ -45,9 +45,6 @@ export type ClientConfig = {
DiagnosticsEnabled: string;
DisableRefetchingOnBrowserFocus: string;
DisableWakeUpReconnectHandler: string;
EmailLoginButtonBorderColor: string;
EmailLoginButtonColor: string;
EmailLoginButtonTextColor: string;
EmailNotificationContentsType: string;
EnableAskCommunityLink: string;
EnableBanner: string;
@@ -654,9 +651,6 @@ export type EmailSettings = {
EnablePreviewModeBanner: boolean;
SkipServerCertificateVerification: boolean;
EmailNotificationContentsType: string;
LoginButtonColor: string;
LoginButtonBorderColor: string;
LoginButtonTextColor: string;
};
export type RateLimitSettings = {