111 lines
3.4 KiB
Plaintext
111 lines
3.4 KiB
Plaintext
<fieldset class="box tabular">
|
|
<legend>Connection Settings</legend>
|
|
|
|
<p>
|
|
<%= f.label :name, 'Name' %> <span class="required">*</span>
|
|
<%= f.text_field :name, size: 30, required: true %>
|
|
</p>
|
|
|
|
<p>
|
|
<%= f.label :host, 'Host' %> <span class="required">*</span>
|
|
<%= f.text_field :host, size: 30, required: true, placeholder: 'ldap.example.com or IP' %>
|
|
</p>
|
|
|
|
<p>
|
|
<%= f.label :port, 'Port' %> <span class="required">*</span>
|
|
<%= f.number_field :port, value: (@ldap.port || 389), min: 1, max: 65535, required: true %>
|
|
</p>
|
|
|
|
<p>
|
|
<%= f.label :tls, 'LDAPS (TLS)' %>
|
|
<%= f.check_box :tls %>
|
|
<em class="info">(Use port 636 for LDAPS)</em>
|
|
</p>
|
|
|
|
<p>
|
|
<%= f.label :verify_peer, 'Verify SSL Certificate' %>
|
|
<%= f.check_box :verify_peer %>
|
|
</p>
|
|
|
|
<p>
|
|
<%= f.label :timeout, 'Timeout (seconds)' %>
|
|
<%= f.number_field :timeout, value: (@ldap.timeout || 20), min: 1, max: 300 %>
|
|
</p>
|
|
</fieldset>
|
|
|
|
<fieldset class="box tabular" id="domain-section" style="display: none;">
|
|
<legend>Domain Settings (Auto-Configure)</legend>
|
|
|
|
<p>
|
|
<label for="domain_input">Domain</label> <span class="required">*</span>
|
|
<input type="text" id="domain_input" size="30" placeholder="finnq.com" />
|
|
<em class="info">(Enter domain to auto-configure LDAP settings)</em>
|
|
</p>
|
|
|
|
<p>
|
|
<label for="bind_user">Bind User</label>
|
|
<input type="text" id="bind_user" size="20" value="admin" />
|
|
<em class="info">(Default: admin)</em>
|
|
</p>
|
|
</fieldset>
|
|
|
|
<fieldset class="box tabular" id="bind-section">
|
|
<legend>Bind Credentials</legend>
|
|
|
|
<p>
|
|
<%= f.label :account, 'Bind DN' %>
|
|
<%= f.text_field :account, size: 60, placeholder: 'uid=admin,cn=users,cn=accounts,dc=example,dc=com' %>
|
|
<em class="info">(Leave empty for anonymous bind)</em>
|
|
</p>
|
|
|
|
<p>
|
|
<%= f.label :account_password, 'Bind Password' %>
|
|
<%= f.password_field :account_password, size: 30, autocomplete: 'off' %>
|
|
</p>
|
|
</fieldset>
|
|
|
|
<fieldset class="box tabular" id="search-section">
|
|
<legend>Search Settings</legend>
|
|
|
|
<p>
|
|
<%= f.label :base_dn, 'Base DN' %> <span class="required">*</span>
|
|
<%= f.text_field :base_dn, size: 60, placeholder: 'cn=users,cn=accounts,dc=example,dc=com' %>
|
|
</p>
|
|
|
|
<p>
|
|
<%= f.label :filter, 'LDAP Filter' %>
|
|
<%= f.text_field :filter, size: 60, placeholder: '(objectClass=person)' %>
|
|
</p>
|
|
|
|
<p>
|
|
<%= f.label :onthefly_register, 'On-the-fly user creation' %>
|
|
<%= f.check_box :onthefly_register, checked: true %>
|
|
<em class="info">(Automatically create Redmine user on first login)</em>
|
|
</p>
|
|
</fieldset>
|
|
|
|
<fieldset class="box tabular" id="attr-section">
|
|
<legend>Attribute Mapping</legend>
|
|
|
|
<p>
|
|
<%= f.label :attr_login, 'Login attribute' %> <span class="required">*</span>
|
|
<%= f.text_field :attr_login, size: 30, placeholder: 'uid' %>
|
|
<em class="info">(uid for LDAP, sAMAccountName for AD)</em>
|
|
</p>
|
|
|
|
<p>
|
|
<%= f.label :attr_firstname, 'First name attribute' %> <span class="required">*</span>
|
|
<%= f.text_field :attr_firstname, size: 30, placeholder: 'givenName' %>
|
|
</p>
|
|
|
|
<p>
|
|
<%= f.label :attr_lastname, 'Last name attribute' %> <span class="required">*</span>
|
|
<%= f.text_field :attr_lastname, size: 30, placeholder: 'sn' %>
|
|
</p>
|
|
|
|
<p>
|
|
<%= f.label :attr_mail, 'Email attribute' %> <span class="required">*</span>
|
|
<%= f.text_field :attr_mail, size: 30, placeholder: 'mail' %>
|
|
</p>
|
|
</fieldset>
|