Making LDAP FirstName and LastName fields optional. (#3919)

Этот коммит содержится в:
Christopher Speller
2016-09-01 10:03:55 -04:00
коммит произвёл Joram Wilander
родитель e1e29a86d9
Коммит 276e0189b1
6 изменённых файлов: 9 добавлений и 15 удалений

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

@@ -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}

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

@@ -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'