2017-03-17 13:55:04 +08:00
|
|
|
<div class="ldap dldap field {{if not (or (eq .type 2) (eq .type 5))}}hide{{end}}">
|
|
|
|
<div class="inline required field {{if .Err_SecurityProtocol}}error{{end}}">
|
|
|
|
<label>{{.i18n.Tr "admin.auths.security_protocol"}}</label>
|
|
|
|
<div class="ui selection security-protocol dropdown">
|
|
|
|
<input type="hidden" id="security_protocol" name="security_protocol" value="{{.security_protocol}}">
|
|
|
|
<div class="text">{{.CurrentSecurityProtocol}}</div>
|
2020-11-01 06:15:11 +08:00
|
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
2017-03-17 13:55:04 +08:00
|
|
|
<div class="menu">
|
|
|
|
{{range .SecurityProtocols}}
|
2021-07-25 15:09:52 +08:00
|
|
|
<div class="item" data-value="{{.Type.Int}}">{{.Name}}</div>
|
2017-03-17 13:55:04 +08:00
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="required field">
|
|
|
|
<label for="host">{{.i18n.Tr "admin.auths.host"}}</label>
|
|
|
|
<input id="host" name="host" value="{{.host}}" placeholder="e.g. mydomain.com">
|
|
|
|
</div>
|
|
|
|
<div class="required field">
|
|
|
|
<label for="port">{{.i18n.Tr "admin.auths.port"}}</label>
|
|
|
|
<input id="port" name="port" value="{{.port}}" placeholder="e.g. 636">
|
|
|
|
</div>
|
|
|
|
<div class="ldap field {{if not (eq .type 2)}}hide{{end}}">
|
|
|
|
<label for="bind_dn">{{.i18n.Tr "admin.auths.bind_dn"}}</label>
|
|
|
|
<input id="bind_dn" name="bind_dn" value="{{.bind_dn}}" placeholder="e.g. cn=Search,dc=mydomain,dc=com">
|
|
|
|
</div>
|
|
|
|
<input class="fake" type="password">
|
|
|
|
<div class="ldap field {{if not (eq .type 2)}}hide{{end}}">
|
|
|
|
<label for="bind_password">{{.i18n.Tr "admin.auths.bind_password"}}</label>
|
2020-10-09 15:32:30 +08:00
|
|
|
<input id="bind_password" name="bind_password" type="password" autocomplete="off" value="{{.bind_password}}">
|
2017-03-17 13:55:04 +08:00
|
|
|
</div>
|
2018-12-28 00:51:19 +08:00
|
|
|
<div class="binddnrequired {{if (eq .type 2)}}required{{end}} field">
|
2017-03-17 13:55:04 +08:00
|
|
|
<label for="user_base">{{.i18n.Tr "admin.auths.user_base"}}</label>
|
|
|
|
<input id="user_base" name="user_base" value="{{.user_base}}" placeholder="e.g. ou=Users,dc=mydomain,dc=com">
|
|
|
|
</div>
|
|
|
|
<div class="dldap required field {{if not (eq .type 5)}}hide{{end}}">
|
|
|
|
<label for="user_dn">{{.i18n.Tr "admin.auths.user_dn"}}</label>
|
|
|
|
<input id="user_dn" name="user_dn" value="{{.user_dn}}" placeholder="e.g. uid=%s,ou=Users,dc=mydomain,dc=com">
|
|
|
|
</div>
|
|
|
|
<div class="required field">
|
|
|
|
<label for="filter">{{.i18n.Tr "admin.auths.filter"}}</label>
|
|
|
|
<input id="filter" name="filter" value="{{.filter}}" placeholder="e.g. (&(objectClass=posixAccount)(uid=%s))">
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<label for="admin_filter">{{.i18n.Tr "admin.auths.admin_filter"}}</label>
|
|
|
|
<input id="admin_filter" name="admin_filter" value="{{.admin_filter}}">
|
|
|
|
</div>
|
2020-03-05 14:30:33 +08:00
|
|
|
<div class="field">
|
|
|
|
<label for="restricted_filter">{{.i18n.Tr "admin.auths.restricted_filter"}}</label>
|
|
|
|
<input id="restricted_filter" name="admin_filter" value="{{.restricted_filter}}">
|
|
|
|
<p class="help">{{.i18n.Tr "admin.auths.restricted_filter_helper"}}</p>
|
|
|
|
</div>
|
2017-03-17 13:55:04 +08:00
|
|
|
<div class="field">
|
|
|
|
<label for="attribute_username">{{.i18n.Tr "admin.auths.attribute_username"}}</label>
|
|
|
|
<input id="attribute_username" name="attribute_username" value="{{.attribute_username}}" placeholder="{{.i18n.Tr "admin.auths.attribute_username_placeholder"}}">
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<label for="attribute_name">{{.i18n.Tr "admin.auths.attribute_name"}}</label>
|
|
|
|
<input id="attribute_name" name="attribute_name" value="{{.attribute_name}}">
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<label for="attribute_surname">{{.i18n.Tr "admin.auths.attribute_surname"}}</label>
|
|
|
|
<input id="attribute_surname" name="attribute_surname" value="{{.attribute_surname}}">
|
|
|
|
</div>
|
|
|
|
<div class="required field">
|
|
|
|
<label for="attribute_mail">{{.i18n.Tr "admin.auths.attribute_mail"}}</label>
|
|
|
|
<input id="attribute_mail" name="attribute_mail" value="{{.attribute_mail}}" placeholder="e.g. mail">
|
|
|
|
</div>
|
2018-05-24 12:59:02 +08:00
|
|
|
<div class="field">
|
2021-04-11 11:46:37 +08:00
|
|
|
<label for="attribute_ssh_public_key">{{.i18n.Tr "admin.auths.attribute_ssh_public_key"}}</label>
|
|
|
|
<input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{.attribute_ssh_public_key}}" placeholder="e.g. SshPublicKey">
|
2018-05-24 12:59:02 +08:00
|
|
|
</div>
|
2020-09-10 23:30:07 +08:00
|
|
|
<div class="inline field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<label for="groups_enabled"><strong>{{.i18n.Tr "admin.auths.verify_group_membership"}}</strong></label>
|
|
|
|
<input id="groups_enabled" name="groups_enabled" type="checkbox" {{if .groups_enabled}}checked{{end}}>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="groups_enabled_change">
|
|
|
|
<div class="field">
|
|
|
|
<label for="group_dn">{{.i18n.Tr "admin.auths.group_search_base"}}</label>
|
|
|
|
<input id="group_dn" name="group_dn" value="{{.group_dn}}" placeholder="e.g. ou=group,dc=mydomain,dc=com">
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<label for="group_filter">{{.i18n.Tr "admin.auths.valid_groups_filter"}}</label>
|
|
|
|
<input id="group_filter" name="group_filter" value="{{.group_filter}}" placeholder="e.g. (|(cn=gitea_users)(cn=admins))">
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<label for="group_member_uid">{{.i18n.Tr "admin.auths.group_attribute_list_users"}}</label>
|
|
|
|
<input id="group_member_uid" name="group_member_uid" value="{{.group_member_uid}}" placeholder="e.g. memberUid">
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<label for="user_uid">{{.i18n.Tr "admin.auths.user_attribute_in_group"}}</label>
|
|
|
|
<input id="user_uid" name="user_uid" value="{{.user_uid}}" placeholder="e.g. uid">
|
|
|
|
</div>
|
|
|
|
<br/>
|
|
|
|
</div>
|
2018-05-05 22:30:47 +08:00
|
|
|
<div class="ldap inline field {{if not (eq .type 2)}}hide{{end}}">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<label for="use_paged_search"><strong>{{.i18n.Tr "admin.auths.use_paged_search"}}</strong></label>
|
|
|
|
<input id="use_paged_search" name="use_paged_search" class="use-paged-search" type="checkbox" {{if .use_paged_search}}checked{{end}}>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="ldap field search-page-size required {{if or (not (eq .type 2)) (not .use_paged_search)}}hide{{end}}">
|
|
|
|
<label for="search_page_size">{{.i18n.Tr "admin.auths.search_page_size"}}</label>
|
|
|
|
<input id="search_page_size" name="search_page_size" value="{{.search_page_size}}">
|
|
|
|
</div>
|
2017-03-17 13:55:04 +08:00
|
|
|
</div>
|