2024-03-24 23:53:38 +05:30
|
|
|
<div class="ldap dldap field {{if not (or (eq .type 2) (eq .type 5))}}tw-hidden{{end}}">
|
2017-03-17 11:25:04 +05:30
|
|
|
<div class="inline required field {{if .Err_SecurityProtocol}}error{{end}}">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.security_protocol"}}</label>
|
2017-03-17 11:25:04 +05:30
|
|
|
<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 03:45:11 +05:30
|
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
2017-03-17 11:25:04 +05:30
|
|
|
<div class="menu">
|
|
|
|
{{range .SecurityProtocols}}
|
2021-07-25 12:39:52 +05:30
|
|
|
<div class="item" data-value="{{.Type.Int}}">{{.Name}}</div>
|
2017-03-17 11:25:04 +05:30
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="required field">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label for="host">{{ctx.Locale.Tr "admin.auths.host"}}</label>
|
2023-06-14 23:47:58 +05:30
|
|
|
<input id="host" name="host" value="{{.host}}" placeholder="mydomain.com">
|
2017-03-17 11:25:04 +05:30
|
|
|
</div>
|
|
|
|
<div class="required field">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label for="port">{{ctx.Locale.Tr "admin.auths.port"}}</label>
|
2023-06-14 23:47:58 +05:30
|
|
|
<input id="port" name="port" value="{{.port}}" placeholder="636">
|
2017-03-17 11:25:04 +05:30
|
|
|
</div>
|
2024-03-24 23:53:38 +05:30
|
|
|
<div class="has-tls inline field {{if not .HasTLS}}tw-hidden{{end}}">
|
2021-08-12 02:12:58 +05:30
|
|
|
<div class="ui checkbox">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label><strong>{{ctx.Locale.Tr "admin.auths.skip_tls_verify"}}</strong></label>
|
2021-08-12 02:12:58 +05:30
|
|
|
<input name="skip_verify" type="checkbox" {{if .skip_verify}}checked{{end}}>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-03-24 23:53:38 +05:30
|
|
|
<div class="ldap field {{if not (eq .type 2)}}tw-hidden{{end}}">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label for="bind_dn">{{ctx.Locale.Tr "admin.auths.bind_dn"}}</label>
|
2023-06-14 23:47:58 +05:30
|
|
|
<input id="bind_dn" name="bind_dn" value="{{.bind_dn}}" placeholder="cn=Search,dc=mydomain,dc=com">
|
2017-03-17 11:25:04 +05:30
|
|
|
</div>
|
2024-03-24 23:53:38 +05:30
|
|
|
<div class="ldap field {{if not (eq .type 2)}}tw-hidden{{end}}">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label for="bind_password">{{ctx.Locale.Tr "admin.auths.bind_password"}}</label>
|
2020-10-09 13:02:30 +05:30
|
|
|
<input id="bind_password" name="bind_password" type="password" autocomplete="off" value="{{.bind_password}}">
|
2017-03-17 11:25:04 +05:30
|
|
|
</div>
|
2018-12-27 22:21:19 +05:30
|
|
|
<div class="binddnrequired {{if (eq .type 2)}}required{{end}} field">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label for="user_base">{{ctx.Locale.Tr "admin.auths.user_base"}}</label>
|
2023-06-14 23:47:58 +05:30
|
|
|
<input id="user_base" name="user_base" value="{{.user_base}}" placeholder="ou=Users,dc=mydomain,dc=com">
|
2017-03-17 11:25:04 +05:30
|
|
|
</div>
|
2024-03-24 23:53:38 +05:30
|
|
|
<div class="dldap required field {{if not (eq .type 5)}}tw-hidden{{end}}">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label for="user_dn">{{ctx.Locale.Tr "admin.auths.user_dn"}}</label>
|
2023-06-14 23:47:58 +05:30
|
|
|
<input id="user_dn" name="user_dn" value="{{.user_dn}}" placeholder="uid=%s,ou=Users,dc=mydomain,dc=com">
|
2017-03-17 11:25:04 +05:30
|
|
|
</div>
|
|
|
|
<div class="required field">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label for="filter">{{ctx.Locale.Tr "admin.auths.filter"}}</label>
|
2023-06-14 23:47:58 +05:30
|
|
|
<input id="filter" name="filter" value="{{.filter}}" placeholder="(&(objectClass=posixAccount)(|(uid=%[1]s)(mail=%[1]s)))">
|
2017-03-17 11:25:04 +05:30
|
|
|
</div>
|
|
|
|
<div class="field">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label for="admin_filter">{{ctx.Locale.Tr "admin.auths.admin_filter"}}</label>
|
2017-03-17 11:25:04 +05:30
|
|
|
<input id="admin_filter" name="admin_filter" value="{{.admin_filter}}">
|
|
|
|
</div>
|
2020-03-05 12:00:33 +05:30
|
|
|
<div class="field">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label for="restricted_filter">{{ctx.Locale.Tr "admin.auths.restricted_filter"}}</label>
|
2023-02-08 12:14:42 +05:30
|
|
|
<input id="restricted_filter" name="restricted_filter" value="{{.restricted_filter}}">
|
2023-09-25 14:26:50 +05:30
|
|
|
<p class="help">{{ctx.Locale.Tr "admin.auths.restricted_filter_helper"}}</p>
|
2020-03-05 12:00:33 +05:30
|
|
|
</div>
|
2017-03-17 11:25:04 +05:30
|
|
|
<div class="field">
|
2023-09-25 14:26:50 +05:30
|
|
|
<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 11:25:04 +05:30
|
|
|
</div>
|
|
|
|
<div class="field">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label for="attribute_name">{{ctx.Locale.Tr "admin.auths.attribute_name"}}</label>
|
2017-03-17 11:25:04 +05:30
|
|
|
<input id="attribute_name" name="attribute_name" value="{{.attribute_name}}">
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label for="attribute_surname">{{ctx.Locale.Tr "admin.auths.attribute_surname"}}</label>
|
2017-03-17 11:25:04 +05:30
|
|
|
<input id="attribute_surname" name="attribute_surname" value="{{.attribute_surname}}">
|
|
|
|
</div>
|
|
|
|
<div class="required field">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label for="attribute_mail">{{ctx.Locale.Tr "admin.auths.attribute_mail"}}</label>
|
2023-06-14 23:47:58 +05:30
|
|
|
<input id="attribute_mail" name="attribute_mail" value="{{.attribute_mail}}" placeholder="mail">
|
2017-03-17 11:25:04 +05:30
|
|
|
</div>
|
2018-05-24 10:29:02 +05:30
|
|
|
<div class="field">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label for="attribute_ssh_public_key">{{ctx.Locale.Tr "admin.auths.attribute_ssh_public_key"}}</label>
|
2023-06-14 23:47:58 +05:30
|
|
|
<input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{.attribute_ssh_public_key}}" placeholder="SshPublicKey">
|
2018-05-24 10:29:02 +05:30
|
|
|
</div>
|
2021-09-27 08:09:36 +05:30
|
|
|
<div class="field">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label for="attribute_avatar">{{ctx.Locale.Tr "admin.auths.attribute_avatar"}}</label>
|
2023-06-14 23:47:58 +05:30
|
|
|
<input id="attribute_avatar" name="attribute_avatar" value="{{.attribute_avatar}}" placeholder="jpegPhoto">
|
2021-09-27 08:09:36 +05:30
|
|
|
</div>
|
2022-02-11 19:54:58 +05:30
|
|
|
|
|
|
|
<!-- ldap group begin -->
|
2020-09-10 21:00:07 +05:30
|
|
|
<div class="inline field">
|
|
|
|
<div class="ui checkbox">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label><strong>{{ctx.Locale.Tr "admin.auths.enable_ldap_groups"}}</strong></label>
|
2022-02-11 19:54:58 +05:30
|
|
|
<input type="checkbox" name="groups_enabled" class="js-ldap-group-toggle" {{if .groups_enabled}}checked{{end}}>
|
2020-09-10 21:00:07 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
2022-02-11 19:54:58 +05:30
|
|
|
<div id="ldap-group-options" class="ui segment secondary">
|
2020-09-10 21:00:07 +05:30
|
|
|
<div class="field">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.group_search_base"}}</label>
|
2023-06-14 23:47:58 +05:30
|
|
|
<input name="group_dn" value="{{.group_dn}}" placeholder="ou=group,dc=mydomain,dc=com">
|
2020-09-10 21:00:07 +05:30
|
|
|
</div>
|
|
|
|
<div class="field">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.group_attribute_list_users"}}</label>
|
2023-06-14 23:47:58 +05:30
|
|
|
<input name="group_member_uid" value="{{.group_member_uid}}" placeholder="memberUid">
|
2020-09-10 21:00:07 +05:30
|
|
|
</div>
|
|
|
|
<div class="field">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.user_attribute_in_group"}}</label>
|
2023-06-14 23:47:58 +05:30
|
|
|
<input name="user_uid" value="{{.user_uid}}" placeholder="uid">
|
2020-09-10 21:00:07 +05:30
|
|
|
</div>
|
|
|
|
<div class="field">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.verify_group_membership"}}</label>
|
2023-06-14 23:47:58 +05:30
|
|
|
<input name="group_filter" value="{{.group_filter}}" placeholder="(|(cn=gitea_users)(cn=admins))">
|
2022-02-11 19:54:58 +05:30
|
|
|
</div>
|
|
|
|
<div class="field">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.map_group_to_team"}}</label>
|
2023-01-09 18:31:00 +05:30
|
|
|
<textarea name="group_team_map" rows="5" placeholder='{"cn=my-group,cn=groups,dc=example,dc=org": {"MyForgejoOrganization": ["MyForgejoTeam1", "MyForgejoTeam2"]}}'>{{.group_team_map}}</textarea>
|
2022-02-11 19:54:58 +05:30
|
|
|
</div>
|
|
|
|
<div class="ui checkbox">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.map_group_to_team_removal"}}</label>
|
2022-02-11 19:54:58 +05:30
|
|
|
<input name="group_team_map_removal" type="checkbox" {{if .group_team_map_removal}}checked{{end}}>
|
2020-09-10 21:00:07 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
2022-02-11 19:54:58 +05:30
|
|
|
<!-- ldap group end -->
|
|
|
|
|
2024-03-24 23:53:38 +05:30
|
|
|
<div class="ldap inline field {{if not (eq .type 2)}}tw-hidden{{end}}">
|
2018-05-05 20:00:47 +05:30
|
|
|
<div class="ui checkbox">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label for="use_paged_search"><strong>{{ctx.Locale.Tr "admin.auths.use_paged_search"}}</strong></label>
|
2018-05-05 20:00:47 +05:30
|
|
|
<input id="use_paged_search" name="use_paged_search" class="use-paged-search" type="checkbox" {{if .use_paged_search}}checked{{end}}>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-03-24 23:53:38 +05:30
|
|
|
<div class="ldap field search-page-size required {{if or (not (eq .type 2)) (not .use_paged_search)}}tw-hidden{{end}}">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label for="search_page_size">{{ctx.Locale.Tr "admin.auths.search_page_size"}}</label>
|
2018-05-05 20:00:47 +05:30
|
|
|
<input id="search_page_size" name="search_page_size" value="{{.search_page_size}}">
|
|
|
|
</div>
|
2021-09-17 17:13:47 +05:30
|
|
|
<div class="optional field">
|
|
|
|
<div class="ui checkbox">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label>
|
2021-09-17 17:13:47 +05:30
|
|
|
<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}>
|
2023-09-25 14:26:50 +05:30
|
|
|
<p class="help">{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p>
|
2021-09-17 17:13:47 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="inline field">
|
|
|
|
<div class="ui checkbox">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label for="allow_deactivate_all"><strong>{{ctx.Locale.Tr "admin.auths.allow_deactivate_all"}}</strong></label>
|
2021-09-17 17:13:47 +05:30
|
|
|
<input id="allow_deactivate_all" name="allow_deactivate_all" type="checkbox" {{if .allow_deactivate_all}}checked{{end}}>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-03-17 11:25:04 +05:30
|
|
|
</div>
|