Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions api/v4/source/definitions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1660,12 +1660,6 @@ components:
type: integer
LoginFieldName:
type: string
LoginButtonColor:
type: string
LoginButtonBorderColor:
type: string
LoginButtonTextColor:
type: string
LdapDiagnosticResult:
type: object
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,62 +13,17 @@ 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 `LdapSettings`.
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`.

- If using a tool such as [jq](https://stedolan.github.io/jq/), you'd enter: `cat config/config.json | jq '.LdapSettings.LoginButtonColor'`
- When working with the `config.json` file manually, look for an object such as `LdapSettings`, 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.LoginButtonColor'`
- When working with the `config.json` file manually, look for an object such as `EmailSettings`, then within that object, find the key `LoginButtonColor`.

</Tip>

------------------------------------------------------------------------------------------------------------------------

## Experimental System Console configuration settings

### AD/LDAP login button color

Specify the color of the AD/LDAP 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>

### AD/LDAP login button border color

Specify the color of the AD/LDAP 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>

### AD/LDAP login button text color

Specify the color of the AD/LDAP 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>

### Change authentication method

**True**: Users can change their sign-in method to any that is enabled on the server, either via their Profile or the APIs.
Expand Down Expand Up @@ -484,51 +439,6 @@ If the team URL of the primary team is `https://example.mattermost.com/myteam/`,
</tbody>
</table>

### SAML login button color

Specify the color of the SAML 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>

### SAML login button border color

Specify the color of the SAML 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>

### SAML login button text color

Specify the color of the SAML 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>

### Use channel name in email notifications

**True**: Channel and team name appears in email notification subject lines. Useful for servers using only one team.
Expand Down
10 changes: 2 additions & 8 deletions e2e-tests/cypress/tests/support/api/cloud_default_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,7 @@
"QueryTimeout": 60,
"AnalyticsQueryTimeout": 300,
"MaxPageSize": 500,
"LoginFieldName": "",
"LoginButtonColor": "#0000",
"LoginButtonBorderColor": "#2389D7",
"LoginButtonTextColor": "#2389D7"
"LoginFieldName": ""
},
"ComplianceSettings": {
"Enable": false,
Expand Down Expand Up @@ -341,10 +338,7 @@
"NicknameAttribute": "",
"LocaleAttribute": "",
"PositionAttribute": "",
"LoginButtonText": "SAML",
"LoginButtonColor": "#34a28b",
"LoginButtonBorderColor": "#2389D7",
"LoginButtonTextColor": "#ffffff"
"LoginButtonText": "SAML"
},
"NativeAppSettings": {
"AppCustomURLSchemes": [
Expand Down
10 changes: 2 additions & 8 deletions e2e-tests/cypress/tests/support/api/on_prem_default_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -384,10 +384,7 @@
"PrivateKeyFile": "",
"QueryTimeout": 60,
"MaxPageSize": 500,
"LoginFieldName": "",
"LoginButtonColor": "#0000",
"LoginButtonBorderColor": "#2389D7",
"LoginButtonTextColor": "#2389D7"
"LoginFieldName": ""
},
"ComplianceSettings": {
"Enable": false,
Expand Down Expand Up @@ -431,10 +428,7 @@
"NicknameAttribute": "",
"LocaleAttribute": "",
"PositionAttribute": "",
"LoginButtonText": "SAML",
"LoginButtonColor": "#34a28b",
"LoginButtonBorderColor": "#2389D7",
"LoginButtonTextColor": "#ffffff"
"LoginButtonText": "SAML"
},
"NativeAppSettings": {
"AppCustomURLSchemes": [
Expand Down
6 changes: 0 additions & 6 deletions e2e-tests/playwright/lib/src/server/default_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -542,9 +542,6 @@
QueryTimeout: 60,
MaxPageSize: 0,
LoginFieldName: '',
LoginButtonColor: '#0000',
LoginButtonBorderColor: '#2389D7',
LoginButtonTextColor: '#2389D7',
},
ComplianceSettings: {
Enable: false,
Expand Down Expand Up @@ -590,9 +587,6 @@
LocaleAttribute: '',
PositionAttribute: '',
LoginButtonText: 'SAML',
LoginButtonColor: '#34a28b',
LoginButtonBorderColor: '#2389D7',
LoginButtonTextColor: '#ffffff',
},
NativeAppSettings: {
AppCustomURLSchemes: ['mmauth://', 'mmauthbeta://'],
Expand Down Expand Up @@ -821,7 +815,7 @@
IntegratedBoards: true,
CJKSearch: true,
AggregatePluginMetrics: false,
ManagedChannelCategories: false,

Check warning on line 818 in e2e-tests/playwright/lib/src/server/default_config.ts

View workflow job for this annotation

GitHub Actions / check

File has too many lines (909). Maximum allowed is 800
SessionAttributes: false,
DiscoverableChannels: false,
MobileEphemeralMode: false,
Expand Down
3 changes: 0 additions & 3 deletions server/build/docker/keycloak/ldap.mmsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@
"QueryTimeout": 60,
"MaxPageSize": 0,
"LoginFieldName": "",
"LoginButtonColor": "#0000",
"LoginButtonBorderColor": "#2389D7",
"LoginButtonTextColor": "#2389D7",
"Trace": false
}
}
5 changes: 1 addition & 4 deletions server/build/docker/keycloak/saml.mmsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
"NicknameAttribute": "",
"LocaleAttribute": "",
"PositionAttribute": "",
"LoginButtonText": "SAML",
"LoginButtonColor": "#34a28b",
"LoginButtonBorderColor": "#2389D7",
"LoginButtonTextColor": "#ffffff"
"LoginButtonText": "SAML"
}
}
8 changes: 6 additions & 2 deletions server/channels/app/platform/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,10 @@ func TestNewSyncsMarkdownMaxLenWithMaxPostSize(t *testing.T) {
mainHelper.Parallel(t)
th := Setup(t)

maxPostSize := th.Service.MaxPostSize()
assert.Equal(t, 4*maxPostSize, markdown.MaxLen())
// markdown.SetMaxPostRunes is package-global; parallel tests (including
// markdown's own tests) can overwrite it between Setup and this check.
require.Eventually(t, func() bool {
maxPostSize := th.Service.MaxPostSize()
return markdown.MaxLen() == 4*maxPostSize
}, 5*time.Second, 10*time.Millisecond)
}
12 changes: 0 additions & 12 deletions server/config/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,14 +369,8 @@ func GenerateLimitedClientConfig(c *model.Config, telemetryID string, license *m
props["CustomDescriptionText"] = ""
props["EnableLdap"] = "false"
props["LdapLoginFieldName"] = ""
props["LdapLoginButtonColor"] = ""
props["LdapLoginButtonBorderColor"] = ""
props["LdapLoginButtonTextColor"] = ""
props["EnableSaml"] = "false"
props["SamlLoginButtonText"] = ""
props["SamlLoginButtonColor"] = ""
props["SamlLoginButtonBorderColor"] = ""
props["SamlLoginButtonTextColor"] = ""
props["EnableSignUpWithGoogle"] = "false"
props["EnableSignUpWithOffice365"] = "false"
props["EnableSignUpWithOpenId"] = "false"
Expand All @@ -397,17 +391,11 @@ func GenerateLimitedClientConfig(c *model.Config, telemetryID string, license *m
if *license.Features.LDAP {
props["EnableLdap"] = strconv.FormatBool(*c.LdapSettings.Enable)
props["LdapLoginFieldName"] = *c.LdapSettings.LoginFieldName
props["LdapLoginButtonColor"] = *c.LdapSettings.LoginButtonColor
props["LdapLoginButtonBorderColor"] = *c.LdapSettings.LoginButtonBorderColor
props["LdapLoginButtonTextColor"] = *c.LdapSettings.LoginButtonTextColor
}

if *license.Features.SAML {
props["EnableSaml"] = strconv.FormatBool(*c.SamlSettings.Enable)
props["SamlLoginButtonText"] = *c.SamlSettings.LoginButtonText
props["SamlLoginButtonColor"] = *c.SamlSettings.LoginButtonColor
props["SamlLoginButtonBorderColor"] = *c.SamlSettings.LoginButtonBorderColor
props["SamlLoginButtonTextColor"] = *c.SamlSettings.LoginButtonTextColor
}

if *license.Features.CustomTermsOfService {
Expand Down
32 changes: 0 additions & 32 deletions server/public/model/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2724,10 +2724,6 @@ type LdapSettings struct {

// Customization
LoginFieldName *string `access:"authentication_ldap"`

LoginButtonColor *string `access:"experimental_features"`
LoginButtonBorderColor *string `access:"experimental_features"`
LoginButtonTextColor *string `access:"experimental_features"`
}

func (s *LdapSettings) SetDefaults() {
Expand Down Expand Up @@ -2865,18 +2861,6 @@ func (s *LdapSettings) SetDefaults() {
if s.LoginFieldName == nil {
s.LoginFieldName = new(LdapSettingsDefaultLoginFieldName)
}

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 ComplianceSettings struct {
Expand Down Expand Up @@ -3043,10 +3027,6 @@ type SamlSettings struct {
PositionAttribute *string `access:"authentication_saml"`

LoginButtonText *string `access:"authentication_saml"`

LoginButtonColor *string `access:"experimental_features"`
LoginButtonBorderColor *string `access:"experimental_features"`
LoginButtonTextColor *string `access:"experimental_features"`
}

func (s *SamlSettings) SetDefaults() {
Expand Down Expand Up @@ -3175,18 +3155,6 @@ func (s *SamlSettings) SetDefaults() {
if s.LocaleAttribute == nil {
s.LocaleAttribute = new(SamlSettingsDefaultLocaleAttribute)
}

if s.LoginButtonColor == nil {
s.LoginButtonColor = new("#34a28b")
}

if s.LoginButtonBorderColor == nil {
s.LoginButtonBorderColor = new("#2389D7")
}

if s.LoginButtonTextColor == nil {
s.LoginButtonTextColor = new("#ffffff")
}
}

type NativeAppSettings struct {
Expand Down
4 changes: 3 additions & 1 deletion server/public/shared/markdown/markdown_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ func TestParse(t *testing.T) {
})

t.Run("SetMaxPostSize raises the cap so a previously rejected input is parsed", func(t *testing.T) {
SetMaxPostRunes(defaultMaxPostRunes)
defer SetMaxPostRunes(defaultMaxPostRunes)

SetMaxPostRunes(defaultMaxPostRunes)
markdown := strings.Repeat("a", MaxLen()+1)

document, _ := Parse(markdown)
Expand All @@ -32,6 +32,8 @@ func TestParse(t *testing.T) {

document, _ = Parse(markdown)
assert.NotEmpty(t, document.Children)

SetMaxPostRunes(defaultMaxPostRunes)
})

t.Run("nesting depth is bounded regardless of how deeply a single line nests", func(t *testing.T) {
Expand Down
10 changes: 2 additions & 8 deletions server/tests/test-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,7 @@
"SkipCertificateVerification": false,
"QueryTimeout": 60,
"MaxPageSize": 0,
"LoginFieldName": "",
"LoginButtonColor": "",
"LoginButtonBorderColor": "",
"LoginButtonTextColor": ""
"LoginFieldName": ""
},
"ComplianceSettings": {
"Enable": false,
Expand Down Expand Up @@ -291,10 +288,7 @@
"NicknameAttribute": "",
"LocaleAttribute": "",
"PositionAttribute": "",
"LoginButtonText": "With SAML",
"LoginButtonColor": "",
"LoginButtonBorderColor": "",
"LoginButtonTextColor": ""
"LoginButtonText": "With SAML"
},
"NativeAppSettings": {
"AppDownloadLink": "https://mattermost.com/download/",
Expand Down
Loading
Loading