2023-02-19 12:06:14 +08:00
|
|
|
<div class="ldap dldap field {{if not (or (eq .type 2) (eq .type 5))}}gt-hidden{{end}}">
|
2017-03-17 13:55:04 +08:00
|
|
|
<div class="inline required field {{if .Err_SecurityProtocol}}error{{end}}">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.security_protocol"}}</label>
|
2017-03-17 13:55:04 +08:00
|
|
|
<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">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label for="host">{{ctx.Locale.Tr "admin.auths.host"}}</label>
|
2023-06-15 02:17:58 +08:00
|
|
|
<input id="host" name="host" value="{{.host}}" placeholder="mydomain.com">
|
2017-03-17 13:55:04 +08:00
|
|
|
</div>
|
|
|
|
<div class="required field">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label for="port">{{ctx.Locale.Tr "admin.auths.port"}}</label>
|
2023-06-15 02:17:58 +08:00
|
|
|
<input id="port" name="port" value="{{.port}}" placeholder="636">
|
2017-03-17 13:55:04 +08:00
|
|
|
</div>
|
2023-02-19 12:06:14 +08:00
|
|
|
<div class="has-tls inline field {{if not .HasTLS}}gt-hidden{{end}}">
|
2021-08-12 04:42:58 +08:00
|
|
|
<div class="ui checkbox">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label><strong>{{ctx.Locale.Tr "admin.auths.skip_tls_verify"}}</strong></label>
|
2021-08-12 04:42:58 +08:00
|
|
|
<input name="skip_verify" type="checkbox" {{if .skip_verify}}checked{{end}}>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-02-19 12:06:14 +08:00
|
|
|
<div class="ldap field {{if not (eq .type 2)}}gt-hidden{{end}}">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label for="bind_dn">{{ctx.Locale.Tr "admin.auths.bind_dn"}}</label>
|
2023-06-15 02:17:58 +08:00
|
|
|
<input id="bind_dn" name="bind_dn" value="{{.bind_dn}}" placeholder="cn=Search,dc=mydomain,dc=com">
|
2017-03-17 13:55:04 +08:00
|
|
|
</div>
|
2023-02-19 12:06:14 +08:00
|
|
|
<div class="ldap field {{if not (eq .type 2)}}gt-hidden{{end}}">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label for="bind_password">{{ctx.Locale.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">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label for="user_base">{{ctx.Locale.Tr "admin.auths.user_base"}}</label>
|
2023-06-15 02:17:58 +08:00
|
|
|
<input id="user_base" name="user_base" value="{{.user_base}}" placeholder="ou=Users,dc=mydomain,dc=com">
|
2017-03-17 13:55:04 +08:00
|
|
|
</div>
|
2023-02-19 12:06:14 +08:00
|
|
|
<div class="dldap required field {{if not (eq .type 5)}}gt-hidden{{end}}">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label for="user_dn">{{ctx.Locale.Tr "admin.auths.user_dn"}}</label>
|
2023-06-15 02:17:58 +08:00
|
|
|
<input id="user_dn" name="user_dn" value="{{.user_dn}}" placeholder="uid=%s,ou=Users,dc=mydomain,dc=com">
|
2017-03-17 13:55:04 +08:00
|
|
|
</div>
|
|
|
|
<div class="required field">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label for="filter">{{ctx.Locale.Tr "admin.auths.filter"}}</label>
|
2023-06-15 02:17:58 +08:00
|
|
|
<input id="filter" name="filter" value="{{.filter}}" placeholder="(&(objectClass=posixAccount)(|(uid=%[1]s)(mail=%[1]s)))">
|
2017-03-17 13:55:04 +08:00
|
|
|
</div>
|
|
|
|
<div class="field">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label for="admin_filter">{{ctx.Locale.Tr "admin.auths.admin_filter"}}</label>
|
2017-03-17 13:55:04 +08:00
|
|
|
<input id="admin_filter" name="admin_filter" value="{{.admin_filter}}">
|
|
|
|
</div>
|
2020-03-05 14:30:33 +08:00
|
|
|
<div class="field">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label for="restricted_filter">{{ctx.Locale.Tr "admin.auths.restricted_filter"}}</label>
|
2023-02-08 14:44:42 +08:00
|
|
|
<input id="restricted_filter" name="restricted_filter" value="{{.restricted_filter}}">
|
2023-09-25 16:56:50 +08:00
|
|
|
<p class="help">{{ctx.Locale.Tr "admin.auths.restricted_filter_helper"}}</p>
|
2020-03-05 14:30:33 +08:00
|
|
|
</div>
|
2017-03-17 13:55:04 +08:00
|
|
|
<div class="field">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label for="attribute_username">{{ctx.Locale.Tr "admin.auths.attribute_username"}}</label>
|
|
|
|
<input id="attribute_username" name="attribute_username" value="{{.attribute_username}}" placeholder="{{ctx.Locale.Tr "admin.auths.attribute_username_placeholder"}}">
|
2017-03-17 13:55:04 +08:00
|
|
|
</div>
|
|
|
|
<div class="field">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label for="attribute_name">{{ctx.Locale.Tr "admin.auths.attribute_name"}}</label>
|
2017-03-17 13:55:04 +08:00
|
|
|
<input id="attribute_name" name="attribute_name" value="{{.attribute_name}}">
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label for="attribute_surname">{{ctx.Locale.Tr "admin.auths.attribute_surname"}}</label>
|
2017-03-17 13:55:04 +08:00
|
|
|
<input id="attribute_surname" name="attribute_surname" value="{{.attribute_surname}}">
|
|
|
|
</div>
|
|
|
|
<div class="required field">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label for="attribute_mail">{{ctx.Locale.Tr "admin.auths.attribute_mail"}}</label>
|
2023-06-15 02:17:58 +08:00
|
|
|
<input id="attribute_mail" name="attribute_mail" value="{{.attribute_mail}}" placeholder="mail">
|
2017-03-17 13:55:04 +08:00
|
|
|
</div>
|
2018-05-24 12:59:02 +08:00
|
|
|
<div class="field">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label for="attribute_ssh_public_key">{{ctx.Locale.Tr "admin.auths.attribute_ssh_public_key"}}</label>
|
2023-06-15 02:17:58 +08:00
|
|
|
<input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{.attribute_ssh_public_key}}" placeholder="SshPublicKey">
|
2018-05-24 12:59:02 +08:00
|
|
|
</div>
|
2021-09-27 10:39:36 +08:00
|
|
|
<div class="field">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label for="attribute_avatar">{{ctx.Locale.Tr "admin.auths.attribute_avatar"}}</label>
|
2023-06-15 02:17:58 +08:00
|
|
|
<input id="attribute_avatar" name="attribute_avatar" value="{{.attribute_avatar}}" placeholder="jpegPhoto">
|
2021-09-27 10:39:36 +08:00
|
|
|
</div>
|
2022-02-11 22:24:58 +08:00
|
|
|
|
|
|
|
<!-- ldap group begin -->
|
2020-09-10 23:30:07 +08:00
|
|
|
<div class="inline field">
|
|
|
|
<div class="ui checkbox">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label><strong>{{ctx.Locale.Tr "admin.auths.enable_ldap_groups"}}</strong></label>
|
2022-02-11 22:24:58 +08:00
|
|
|
<input type="checkbox" name="groups_enabled" class="js-ldap-group-toggle" {{if .groups_enabled}}checked{{end}}>
|
2020-09-10 23:30:07 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-02-11 22:24:58 +08:00
|
|
|
<div id="ldap-group-options" class="ui segment secondary">
|
2020-09-10 23:30:07 +08:00
|
|
|
<div class="field">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.group_search_base"}}</label>
|
2023-06-15 02:17:58 +08:00
|
|
|
<input name="group_dn" value="{{.group_dn}}" placeholder="ou=group,dc=mydomain,dc=com">
|
2020-09-10 23:30:07 +08:00
|
|
|
</div>
|
|
|
|
<div class="field">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.group_attribute_list_users"}}</label>
|
2023-06-15 02:17:58 +08:00
|
|
|
<input name="group_member_uid" value="{{.group_member_uid}}" placeholder="memberUid">
|
2020-09-10 23:30:07 +08:00
|
|
|
</div>
|
|
|
|
<div class="field">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.user_attribute_in_group"}}</label>
|
2023-06-15 02:17:58 +08:00
|
|
|
<input name="user_uid" value="{{.user_uid}}" placeholder="uid">
|
2020-09-10 23:30:07 +08:00
|
|
|
</div>
|
|
|
|
<div class="field">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.verify_group_membership"}}</label>
|
2023-06-15 02:17:58 +08:00
|
|
|
<input name="group_filter" value="{{.group_filter}}" placeholder="(|(cn=gitea_users)(cn=admins))">
|
2022-02-11 22:24:58 +08:00
|
|
|
</div>
|
|
|
|
<div class="field">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.map_group_to_team"}}</label>
|
2023-06-15 02:17:58 +08:00
|
|
|
<textarea name="group_team_map" rows="5" placeholder='{"cn=my-group,cn=groups,dc=example,dc=org": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{.group_team_map}}</textarea>
|
2022-02-11 22:24:58 +08:00
|
|
|
</div>
|
|
|
|
<div class="ui checkbox">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.map_group_to_team_removal"}}</label>
|
2022-02-11 22:24:58 +08:00
|
|
|
<input name="group_team_map_removal" type="checkbox" {{if .group_team_map_removal}}checked{{end}}>
|
2020-09-10 23:30:07 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-02-11 22:24:58 +08:00
|
|
|
<!-- ldap group end -->
|
|
|
|
|
2023-02-19 12:06:14 +08:00
|
|
|
<div class="ldap inline field {{if not (eq .type 2)}}gt-hidden{{end}}">
|
2018-05-05 22:30:47 +08:00
|
|
|
<div class="ui checkbox">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label for="use_paged_search"><strong>{{ctx.Locale.Tr "admin.auths.use_paged_search"}}</strong></label>
|
2018-05-05 22:30:47 +08:00
|
|
|
<input id="use_paged_search" name="use_paged_search" class="use-paged-search" type="checkbox" {{if .use_paged_search}}checked{{end}}>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-02-19 12:06:14 +08:00
|
|
|
<div class="ldap field search-page-size required {{if or (not (eq .type 2)) (not .use_paged_search)}}gt-hidden{{end}}">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label for="search_page_size">{{ctx.Locale.Tr "admin.auths.search_page_size"}}</label>
|
2018-05-05 22:30:47 +08:00
|
|
|
<input id="search_page_size" name="search_page_size" value="{{.search_page_size}}">
|
|
|
|
</div>
|
2021-09-17 19:43:47 +08:00
|
|
|
<div class="optional field">
|
|
|
|
<div class="ui checkbox">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label>
|
2021-09-17 19:43:47 +08:00
|
|
|
<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}>
|
2023-09-25 16:56:50 +08:00
|
|
|
<p class="help">{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p>
|
2021-09-17 19:43:47 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="inline field">
|
|
|
|
<div class="ui checkbox">
|
2023-09-25 16:56:50 +08:00
|
|
|
<label for="allow_deactivate_all"><strong>{{ctx.Locale.Tr "admin.auths.allow_deactivate_all"}}</strong></label>
|
2021-09-17 19:43:47 +08:00
|
|
|
<input id="allow_deactivate_all" name="allow_deactivate_all" type="checkbox" {{if .allow_deactivate_all}}checked{{end}}>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-03-17 13:55:04 +08:00
|
|
|
</div>
|