summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
Diffstat (limited to 'webapp')
-rw-r--r--webapp/components/admin_console/ldap_settings.jsx4
-rw-r--r--webapp/components/user_settings/user_settings_general.jsx4
-rw-r--r--webapp/i18n/en.json4
3 files changed, 7 insertions, 5 deletions
diff --git a/webapp/components/admin_console/ldap_settings.jsx b/webapp/components/admin_console/ldap_settings.jsx
index 32cdbab3a..23728870e 100644
--- a/webapp/components/admin_console/ldap_settings.jsx
+++ b/webapp/components/admin_console/ldap_settings.jsx
@@ -236,7 +236,7 @@ export default class LdapSettings extends AdminSettings {
helpText={
<FormattedMessage
id='admin.ldap.firstnameAttrDesc'
- defaultMessage='The attribute in the LDAP server that will be used to populate the first name of users in Mattermost.'
+ defaultMessage='(Optional) The attribute in the LDAP server that will be used to populate the first name of users in Mattermost.'
/>
}
value={this.state.firstNameAttribute}
@@ -255,7 +255,7 @@ export default class LdapSettings extends AdminSettings {
helpText={
<FormattedMessage
id='admin.ldap.lastnameAttrDesc'
- defaultMessage='The attribute in the LDAP server that will be used to populate the last name of users in Mattermost.'
+ defaultMessage='(Optional) The attribute in the LDAP server that will be used to populate the last name of users in Mattermost.'
/>
}
value={this.state.lastNameAttribute}
diff --git a/webapp/components/user_settings/user_settings_general.jsx b/webapp/components/user_settings/user_settings_general.jsx
index cc63e4fbf..07af50059 100644
--- a/webapp/components/user_settings/user_settings_general.jsx
+++ b/webapp/components/user_settings/user_settings_general.jsx
@@ -629,7 +629,9 @@ class UserSettingsGeneralTab extends React.Component {
if (this.props.activeSection === 'name') {
let extraInfo;
let submit = null;
- if (this.props.user.auth_service === '') {
+ if (this.props.user.auth_service === '' ||
+ (this.props.user.auth_service === 'ldap' &&
+ (global.window.mm_config.FirstNameAttributeSet === 'false' || global.window.mm_config.LastNameAttributeSet === 'false'))) {
inputs.push(
<div
key='firstNameSetting'
diff --git a/webapp/i18n/en.json b/webapp/i18n/en.json
index 9f01f6251..b5e3b3645 100644
--- a/webapp/i18n/en.json
+++ b/webapp/i18n/en.json
@@ -401,13 +401,13 @@
"admin.ldap.emailAttrTitle": "Email Attribute:",
"admin.ldap.enableDesc": "When true, Mattermost allows login using LDAP",
"admin.ldap.enableTitle": "Enable sign-in with LDAP:",
- "admin.ldap.firstnameAttrDesc": "The attribute in the LDAP server that will be used to populate the first name of users in Mattermost.",
+ "admin.ldap.firstnameAttrDesc": "(Optional) The attribute in the LDAP server that will be used to populate the first name of users in Mattermost.",
"admin.ldap.firstnameAttrEx": "Ex \"givenName\"",
"admin.ldap.firstnameAttrTitle": "First Name Attribute",
"admin.ldap.idAttrDesc": "The attribute in the LDAP server that will be used as a unique identifier in Mattermost. It should be an LDAP attribute with a value that does not change, such as username or uid. If a user’s ID Attribute changes, it will create a new Mattermost account unassociated with their old one. This is the value used to log in to Mattermost in the \"LDAP Username\" field on the sign in page. Normally this attribute is the same as the “Username Attribute” field above. If your team typically uses domain\\username to sign in to other services with LDAP, you may choose to put domain\\username in this field to maintain consistency between sites.",
"admin.ldap.idAttrEx": "Ex \"sAMAccountName\"",
"admin.ldap.idAttrTitle": "ID Attribute: ",
- "admin.ldap.lastnameAttrDesc": "The attribute in the LDAP server that will be used to populate the last name of users in Mattermost.",
+ "admin.ldap.lastnameAttrDesc": "(Optional) The attribute in the LDAP server that will be used to populate the last name of users in Mattermost.",
"admin.ldap.lastnameAttrEx": "Ex \"sn\"",
"admin.ldap.lastnameAttrTitle": "Last Name Attribute:",
"admin.ldap.loginNameDesc": "The placeholder text that appears in the login field on the login page. Defaults to \"LDAP Username\".",