Making LDAP FirstName and LastName fields optional. (#3919)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
e1e29a86d9
Коммит
276e0189b1
@@ -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'
|
||||
|
||||
Ссылка в новой задаче
Block a user