Allow customization of LDAP login fields (#2692)
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
c801ce7cd7
Коммит
8c2c892144
@@ -67,6 +67,8 @@ class LdapSettings extends React.Component {
|
||||
config.LdapSettings.UserFilter = this.refs.UserFilter.value.trim();
|
||||
config.LdapSettings.ConnectionSecurity = this.state.connectionSecurity.trim();
|
||||
config.LdapSettings.SkipCertificateVerification = this.state.skipCertificateVerification;
|
||||
config.LdapSettings.LoginFieldName = this.refs.LoginFieldName.value.trim();
|
||||
config.LdapSettings.PasswordFieldName = this.refs.PasswordFieldName.value.trim();
|
||||
|
||||
let QueryTimeout = DEFAULT_QUERY_TIMEOUT;
|
||||
if (!isNaN(parseInt(ReactDOM.findDOMNode(this.refs.QueryTimeout).value, 10))) {
|
||||
@@ -571,6 +573,67 @@ class LdapSettings extends React.Component {
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='form-group'>
|
||||
<label
|
||||
className='control-label col-sm-4'
|
||||
htmlFor='LoginFieldName'
|
||||
>
|
||||
<FormattedMessage
|
||||
id='admin.ldap.loginNameTitle'
|
||||
defaultMessage='Login Field Name:'
|
||||
/>
|
||||
</label>
|
||||
<div className='col-sm-8'>
|
||||
<input
|
||||
type='text'
|
||||
className='form-control'
|
||||
id='LoginFieldName'
|
||||
ref='LoginFieldName'
|
||||
placeholder={Utils.localizeMessage('admin.ldap.loginNameEx', 'Ex "LDAP Username"')}
|
||||
defaultValue={this.props.config.LdapSettings.LoginFieldName}
|
||||
onChange={this.handleChange}
|
||||
disabled={!this.state.enable}
|
||||
/>
|
||||
<p className='help-text'>
|
||||
<FormattedMessage
|
||||
id='admin.ldap.loginNameDesc'
|
||||
defaultMessage='The placeholder text that appears in the login field on the login page. Defaults to "LDAP Username".'
|
||||
/>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='form-group'>
|
||||
<label
|
||||
className='control-label col-sm-4'
|
||||
htmlFor='PasswordFieldName'
|
||||
>
|
||||
<FormattedMessage
|
||||
id='admin.ldap.passwordFieldTitle'
|
||||
defaultMessage='Password Field Name:'
|
||||
/>
|
||||
</label>
|
||||
<div className='col-sm-8'>
|
||||
<input
|
||||
type='text'
|
||||
className='form-control'
|
||||
id='PasswordFieldName'
|
||||
ref='PasswordFieldName'
|
||||
placeholder={Utils.localizeMessage('admin.ldap.passwordFieldEx', 'Ex "LDAP Password"')}
|
||||
defaultValue={this.props.config.LdapSettings.PasswordFieldName}
|
||||
onChange={this.handleChange}
|
||||
disabled={!this.state.enable}
|
||||
/>
|
||||
<p className='help-text'>
|
||||
<FormattedMessage
|
||||
id='admin.ldap.passwordFieldDesc'
|
||||
defaultMessage='The placeholder text that appears in the password field on the login page. Defaults to "LDAP Password".'
|
||||
/>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='form-group'>
|
||||
<div className='col-sm-12'>
|
||||
{serverError}
|
||||
|
||||
Ссылка в новой задаче
Block a user