|
|
@ -1,7 +1,7 @@ |
|
|
|
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin edit authentication")}} |
|
|
|
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin edit authentication")}} |
|
|
|
<div class="admin-setting-content"> |
|
|
|
<div class="admin-setting-content"> |
|
|
|
<h4 class="ui top attached header"> |
|
|
|
<h4 class="ui top attached header"> |
|
|
|
{{.locale.Tr "admin.auths.edit"}} |
|
|
|
{{ctx.Locale.Tr "admin.auths.edit"}} |
|
|
|
</h4> |
|
|
|
</h4> |
|
|
|
<div class="ui attached segment"> |
|
|
|
<div class="ui attached segment"> |
|
|
|
<form class="ui form" action="{{.Link}}" method="post"> |
|
|
|
<form class="ui form" action="{{.Link}}" method="post"> |
|
|
@ -9,12 +9,12 @@ |
|
|
|
{{.CsrfTokenHtml}} |
|
|
|
{{.CsrfTokenHtml}} |
|
|
|
<input type="hidden" name="id" value="{{.Source.ID}}"> |
|
|
|
<input type="hidden" name="id" value="{{.Source.ID}}"> |
|
|
|
<div class="inline field"> |
|
|
|
<div class="inline field"> |
|
|
|
<label>{{$.locale.Tr "admin.auths.auth_type"}}</label> |
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.auth_type"}}</label> |
|
|
|
<input type="hidden" id="auth_type" name="type" value="{{.Source.Type.Int}}"> |
|
|
|
<input type="hidden" id="auth_type" name="type" value="{{.Source.Type.Int}}"> |
|
|
|
<span>{{.Source.TypeName}}</span> |
|
|
|
<span>{{.Source.TypeName}}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="required inline field {{if .Err_Name}}error{{end}}"> |
|
|
|
<div class="required inline field {{if .Err_Name}}error{{end}}"> |
|
|
|
<label for="auth_name">{{.locale.Tr "admin.auths.auth_name"}}</label> |
|
|
|
<label for="auth_name">{{ctx.Locale.Tr "admin.auths.auth_name"}}</label> |
|
|
|
<input id="auth_name" name="name" value="{{.Source.Name}}" autofocus required> |
|
|
|
<input id="auth_name" name="name" value="{{.Source.Name}}" autofocus required> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
@ -22,7 +22,7 @@ |
|
|
|
{{if or .Source.IsLDAP .Source.IsDLDAP}} |
|
|
|
{{if or .Source.IsLDAP .Source.IsDLDAP}} |
|
|
|
{{$cfg:=.Source.Cfg}} |
|
|
|
{{$cfg:=.Source.Cfg}} |
|
|
|
<div class="inline required field {{if .Err_SecurityProtocol}}error{{end}}"> |
|
|
|
<div class="inline required field {{if .Err_SecurityProtocol}}error{{end}}"> |
|
|
|
<label>{{.locale.Tr "admin.auths.security_protocol"}}</label> |
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.security_protocol"}}</label> |
|
|
|
<div class="ui selection security-protocol dropdown"> |
|
|
|
<div class="ui selection security-protocol dropdown"> |
|
|
|
<input type="hidden" id="security_protocol" name="security_protocol" value="{{$cfg.SecurityProtocol.Int}}"> |
|
|
|
<input type="hidden" id="security_protocol" name="security_protocol" value="{{$cfg.SecurityProtocol.Int}}"> |
|
|
|
<div class="text">{{$cfg.SecurityProtocolName}}</div> |
|
|
|
<div class="text">{{$cfg.SecurityProtocolName}}</div> |
|
|
@ -35,107 +35,107 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="required field"> |
|
|
|
<div class="required field"> |
|
|
|
<label for="host">{{.locale.Tr "admin.auths.host"}}</label> |
|
|
|
<label for="host">{{ctx.Locale.Tr "admin.auths.host"}}</label> |
|
|
|
<input id="host" name="host" value="{{$cfg.Host}}" placeholder="mydomain.com" required> |
|
|
|
<input id="host" name="host" value="{{$cfg.Host}}" placeholder="mydomain.com" required> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="required field"> |
|
|
|
<div class="required field"> |
|
|
|
<label for="port">{{.locale.Tr "admin.auths.port"}}</label> |
|
|
|
<label for="port">{{ctx.Locale.Tr "admin.auths.port"}}</label> |
|
|
|
<input id="port" name="port" value="{{$cfg.Port}}" placeholder="636" required> |
|
|
|
<input id="port" name="port" value="{{$cfg.Port}}" placeholder="636" required> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="has-tls inline field {{if not .HasTLS}}gt-hidden{{end}}"> |
|
|
|
<div class="has-tls inline field {{if not .HasTLS}}gt-hidden{{end}}"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<label><strong>{{.locale.Tr "admin.auths.skip_tls_verify"}}</strong></label> |
|
|
|
<label><strong>{{ctx.Locale.Tr "admin.auths.skip_tls_verify"}}</strong></label> |
|
|
|
<input name="skip_verify" type="checkbox" {{if .Source.SkipVerify}}checked{{end}}> |
|
|
|
<input name="skip_verify" type="checkbox" {{if .Source.SkipVerify}}checked{{end}}> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{{if .Source.IsLDAP}} |
|
|
|
{{if .Source.IsLDAP}} |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label for="bind_dn">{{.locale.Tr "admin.auths.bind_dn"}}</label> |
|
|
|
<label for="bind_dn">{{ctx.Locale.Tr "admin.auths.bind_dn"}}</label> |
|
|
|
<input id="bind_dn" name="bind_dn" value="{{$cfg.BindDN}}" placeholder="cn=Search,dc=mydomain,dc=com"> |
|
|
|
<input id="bind_dn" name="bind_dn" value="{{$cfg.BindDN}}" placeholder="cn=Search,dc=mydomain,dc=com"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label for="bind_password">{{.locale.Tr "admin.auths.bind_password"}}</label> |
|
|
|
<label for="bind_password">{{ctx.Locale.Tr "admin.auths.bind_password"}}</label> |
|
|
|
<input id="bind_password" name="bind_password" type="password" value="{{$cfg.BindPassword}}"> |
|
|
|
<input id="bind_password" name="bind_password" type="password" value="{{$cfg.BindPassword}}"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{{end}} |
|
|
|
{{end}} |
|
|
|
<div class="{{if .Source.IsLDAP}}required{{end}} field"> |
|
|
|
<div class="{{if .Source.IsLDAP}}required{{end}} field"> |
|
|
|
<label for="user_base">{{.locale.Tr "admin.auths.user_base"}}</label> |
|
|
|
<label for="user_base">{{ctx.Locale.Tr "admin.auths.user_base"}}</label> |
|
|
|
<input id="user_base" name="user_base" value="{{$cfg.UserBase}}" placeholder="ou=Users,dc=mydomain,dc=com" {{if .Source.IsLDAP}}required{{end}}> |
|
|
|
<input id="user_base" name="user_base" value="{{$cfg.UserBase}}" placeholder="ou=Users,dc=mydomain,dc=com" {{if .Source.IsLDAP}}required{{end}}> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{{if .Source.IsDLDAP}} |
|
|
|
{{if .Source.IsDLDAP}} |
|
|
|
<div class="required field"> |
|
|
|
<div class="required field"> |
|
|
|
<label for="user_dn">{{.locale.Tr "admin.auths.user_dn"}}</label> |
|
|
|
<label for="user_dn">{{ctx.Locale.Tr "admin.auths.user_dn"}}</label> |
|
|
|
<input id="user_dn" name="user_dn" value="{{$cfg.UserDN}}" placeholder="uid=%s,ou=Users,dc=mydomain,dc=com" required> |
|
|
|
<input id="user_dn" name="user_dn" value="{{$cfg.UserDN}}" placeholder="uid=%s,ou=Users,dc=mydomain,dc=com" required> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{{end}} |
|
|
|
{{end}} |
|
|
|
<div class="required field"> |
|
|
|
<div class="required field"> |
|
|
|
<label for="filter">{{.locale.Tr "admin.auths.filter"}}</label> |
|
|
|
<label for="filter">{{ctx.Locale.Tr "admin.auths.filter"}}</label> |
|
|
|
<input id="filter" name="filter" value="{{$cfg.Filter}}" placeholder="(&(objectClass=posixAccount)(|(uid=%[1]s)(mail=%[1]s)))" required> |
|
|
|
<input id="filter" name="filter" value="{{$cfg.Filter}}" placeholder="(&(objectClass=posixAccount)(|(uid=%[1]s)(mail=%[1]s)))" required> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label for="admin_filter">{{.locale.Tr "admin.auths.admin_filter"}}</label> |
|
|
|
<label for="admin_filter">{{ctx.Locale.Tr "admin.auths.admin_filter"}}</label> |
|
|
|
<input id="admin_filter" name="admin_filter" value="{{$cfg.AdminFilter}}"> |
|
|
|
<input id="admin_filter" name="admin_filter" value="{{$cfg.AdminFilter}}"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label for="restricted_filter">{{.locale.Tr "admin.auths.restricted_filter"}}</label> |
|
|
|
<label for="restricted_filter">{{ctx.Locale.Tr "admin.auths.restricted_filter"}}</label> |
|
|
|
<input id="restricted_filter" name="restricted_filter" value="{{$cfg.RestrictedFilter}}"> |
|
|
|
<input id="restricted_filter" name="restricted_filter" value="{{$cfg.RestrictedFilter}}"> |
|
|
|
<p class="help">{{.locale.Tr "admin.auths.restricted_filter_helper"}}</p> |
|
|
|
<p class="help">{{ctx.Locale.Tr "admin.auths.restricted_filter_helper"}}</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label for="attribute_username">{{.locale.Tr "admin.auths.attribute_username"}}</label> |
|
|
|
<label for="attribute_username">{{ctx.Locale.Tr "admin.auths.attribute_username"}}</label> |
|
|
|
<input id="attribute_username" name="attribute_username" value="{{$cfg.AttributeUsername}}" placeholder="{{.locale.Tr "admin.auths.attribute_username_placeholder"}}"> |
|
|
|
<input id="attribute_username" name="attribute_username" value="{{$cfg.AttributeUsername}}" placeholder="{{ctx.Locale.Tr "admin.auths.attribute_username_placeholder"}}"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label for="attribute_name">{{.locale.Tr "admin.auths.attribute_name"}}</label> |
|
|
|
<label for="attribute_name">{{ctx.Locale.Tr "admin.auths.attribute_name"}}</label> |
|
|
|
<input id="attribute_name" name="attribute_name" value="{{$cfg.AttributeName}}"> |
|
|
|
<input id="attribute_name" name="attribute_name" value="{{$cfg.AttributeName}}"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label for="attribute_surname">{{.locale.Tr "admin.auths.attribute_surname"}}</label> |
|
|
|
<label for="attribute_surname">{{ctx.Locale.Tr "admin.auths.attribute_surname"}}</label> |
|
|
|
<input id="attribute_surname" name="attribute_surname" value="{{$cfg.AttributeSurname}}"> |
|
|
|
<input id="attribute_surname" name="attribute_surname" value="{{$cfg.AttributeSurname}}"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="required field"> |
|
|
|
<div class="required field"> |
|
|
|
<label for="attribute_mail">{{.locale.Tr "admin.auths.attribute_mail"}}</label> |
|
|
|
<label for="attribute_mail">{{ctx.Locale.Tr "admin.auths.attribute_mail"}}</label> |
|
|
|
<input id="attribute_mail" name="attribute_mail" value="{{$cfg.AttributeMail}}" placeholder="mail" required> |
|
|
|
<input id="attribute_mail" name="attribute_mail" value="{{$cfg.AttributeMail}}" placeholder="mail" required> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label for="attribute_ssh_public_key">{{.locale.Tr "admin.auths.attribute_ssh_public_key"}}</label> |
|
|
|
<label for="attribute_ssh_public_key">{{ctx.Locale.Tr "admin.auths.attribute_ssh_public_key"}}</label> |
|
|
|
<input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{$cfg.AttributeSSHPublicKey}}" placeholder="SshPublicKey"> |
|
|
|
<input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{$cfg.AttributeSSHPublicKey}}" placeholder="SshPublicKey"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label for="attribute_avatar">{{.locale.Tr "admin.auths.attribute_avatar"}}</label> |
|
|
|
<label for="attribute_avatar">{{ctx.Locale.Tr "admin.auths.attribute_avatar"}}</label> |
|
|
|
<input id="attribute_avatar" name="attribute_avatar" value="{{$cfg.AttributeAvatar}}" placeholder="jpegPhoto"> |
|
|
|
<input id="attribute_avatar" name="attribute_avatar" value="{{$cfg.AttributeAvatar}}" placeholder="jpegPhoto"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- ldap group begin --> |
|
|
|
<!-- ldap group begin --> |
|
|
|
<div class="inline field"> |
|
|
|
<div class="inline field"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<label><strong>{{.locale.Tr "admin.auths.enable_ldap_groups"}}</strong></label> |
|
|
|
<label><strong>{{ctx.Locale.Tr "admin.auths.enable_ldap_groups"}}</strong></label> |
|
|
|
<input type="checkbox" name="groups_enabled" class="js-ldap-group-toggle" {{if $cfg.GroupsEnabled}}checked{{end}}> |
|
|
|
<input type="checkbox" name="groups_enabled" class="js-ldap-group-toggle" {{if $cfg.GroupsEnabled}}checked{{end}}> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div id="ldap-group-options" class="ui segment secondary {{if not $cfg.GroupsEnabled}}gt-hidden{{end}}"> |
|
|
|
<div id="ldap-group-options" class="ui segment secondary {{if not $cfg.GroupsEnabled}}gt-hidden{{end}}"> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label>{{.locale.Tr "admin.auths.group_search_base"}}</label> |
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.group_search_base"}}</label> |
|
|
|
<input name="group_dn" value="{{$cfg.GroupDN}}" placeholder="ou=group,dc=mydomain,dc=com"> |
|
|
|
<input name="group_dn" value="{{$cfg.GroupDN}}" placeholder="ou=group,dc=mydomain,dc=com"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label>{{.locale.Tr "admin.auths.group_attribute_list_users"}}</label> |
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.group_attribute_list_users"}}</label> |
|
|
|
<input name="group_member_uid" value="{{$cfg.GroupMemberUID}}" placeholder="memberUid"> |
|
|
|
<input name="group_member_uid" value="{{$cfg.GroupMemberUID}}" placeholder="memberUid"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label>{{.locale.Tr "admin.auths.user_attribute_in_group"}}</label> |
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.user_attribute_in_group"}}</label> |
|
|
|
<input name="user_uid" value="{{$cfg.UserUID}}" placeholder="uid"> |
|
|
|
<input name="user_uid" value="{{$cfg.UserUID}}" placeholder="uid"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label>{{.locale.Tr "admin.auths.verify_group_membership"}}</label> |
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.verify_group_membership"}}</label> |
|
|
|
<input name="group_filter" value="{{$cfg.GroupFilter}}" placeholder="(|(cn=gitea_users)(cn=admins))"> |
|
|
|
<input name="group_filter" value="{{$cfg.GroupFilter}}" placeholder="(|(cn=gitea_users)(cn=admins))"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label>{{.locale.Tr "admin.auths.map_group_to_team"}}</label> |
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.map_group_to_team"}}</label> |
|
|
|
<textarea name="group_team_map" rows="5" placeholder='{"cn=my-group,cn=groups,dc=example,dc=org": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{$cfg.GroupTeamMap}}</textarea> |
|
|
|
<textarea name="group_team_map" rows="5" placeholder='{"cn=my-group,cn=groups,dc=example,dc=org": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{$cfg.GroupTeamMap}}</textarea> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<label>{{.locale.Tr "admin.auths.map_group_to_team_removal"}}</label> |
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.map_group_to_team_removal"}}</label> |
|
|
|
<input name="group_team_map_removal" type="checkbox" {{if $cfg.GroupTeamMapRemoval}}checked{{end}}> |
|
|
|
<input name="group_team_map_removal" type="checkbox" {{if $cfg.GroupTeamMapRemoval}}checked{{end}}> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -144,31 +144,31 @@ |
|
|
|
{{if .Source.IsLDAP}} |
|
|
|
{{if .Source.IsLDAP}} |
|
|
|
<div class="inline field"> |
|
|
|
<div class="inline field"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<label for="use_paged_search"><strong>{{.locale.Tr "admin.auths.use_paged_search"}}</strong></label> |
|
|
|
<label for="use_paged_search"><strong>{{ctx.Locale.Tr "admin.auths.use_paged_search"}}</strong></label> |
|
|
|
<input id="use_paged_search" name="use_paged_search" type="checkbox" {{if $cfg.UsePagedSearch}}checked{{end}}> |
|
|
|
<input id="use_paged_search" name="use_paged_search" type="checkbox" {{if $cfg.UsePagedSearch}}checked{{end}}> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field required search-page-size{{if not $cfg.UsePagedSearch}} gt-hidden{{end}}"> |
|
|
|
<div class="field required search-page-size{{if not $cfg.UsePagedSearch}} gt-hidden{{end}}"> |
|
|
|
<label for="search_page_size">{{.locale.Tr "admin.auths.search_page_size"}}</label> |
|
|
|
<label for="search_page_size">{{ctx.Locale.Tr "admin.auths.search_page_size"}}</label> |
|
|
|
<input id="search_page_size" name="search_page_size" value="{{if $cfg.UsePagedSearch}}{{$cfg.SearchPageSize}}{{end}}"> |
|
|
|
<input id="search_page_size" name="search_page_size" value="{{if $cfg.UsePagedSearch}}{{$cfg.SearchPageSize}}{{end}}"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="inline field"> |
|
|
|
<div class="inline field"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<label><strong>{{.locale.Tr "admin.auths.attributes_in_bind"}}</strong></label> |
|
|
|
<label><strong>{{ctx.Locale.Tr "admin.auths.attributes_in_bind"}}</strong></label> |
|
|
|
<input name="attributes_in_bind" type="checkbox" {{if $cfg.AttributesInBind}}checked{{end}}> |
|
|
|
<input name="attributes_in_bind" type="checkbox" {{if $cfg.AttributesInBind}}checked{{end}}> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{{end}} |
|
|
|
{{end}} |
|
|
|
<div class="optional field"> |
|
|
|
<div class="optional field"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<label for="skip_local_two_fa"><strong>{{.locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label> |
|
|
|
<label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label> |
|
|
|
<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if $cfg.SkipLocalTwoFA}}checked{{end}}> |
|
|
|
<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if $cfg.SkipLocalTwoFA}}checked{{end}}> |
|
|
|
<p class="help">{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p> |
|
|
|
<p class="help">{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="inline field"> |
|
|
|
<div class="inline field"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<label for="allow_deactivate_all"><strong>{{.locale.Tr "admin.auths.allow_deactivate_all"}}</strong></label> |
|
|
|
<label for="allow_deactivate_all"><strong>{{ctx.Locale.Tr "admin.auths.allow_deactivate_all"}}</strong></label> |
|
|
|
<input id="allow_deactivate_all" name="allow_deactivate_all" type="checkbox" {{if $cfg.AllowDeactivateAll}}checked{{end}}> |
|
|
|
<input id="allow_deactivate_all" name="allow_deactivate_all" type="checkbox" {{if $cfg.AllowDeactivateAll}}checked{{end}}> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -178,7 +178,7 @@ |
|
|
|
{{if .Source.IsSMTP}} |
|
|
|
{{if .Source.IsSMTP}} |
|
|
|
{{$cfg:=.Source.Cfg}} |
|
|
|
{{$cfg:=.Source.Cfg}} |
|
|
|
<div class="inline required field"> |
|
|
|
<div class="inline required field"> |
|
|
|
<label>{{.locale.Tr "admin.auths.smtp_auth"}}</label> |
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.smtp_auth"}}</label> |
|
|
|
<div class="ui selection type dropdown"> |
|
|
|
<div class="ui selection type dropdown"> |
|
|
|
<input type="hidden" id="smtp_auth" name="smtp_auth" value="{{$cfg.Auth}}" required> |
|
|
|
<input type="hidden" id="smtp_auth" name="smtp_auth" value="{{$cfg.Auth}}" required> |
|
|
|
<div class="text">{{$cfg.Auth}}</div> |
|
|
|
<div class="text">{{$cfg.Auth}}</div> |
|
|
@ -191,47 +191,47 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="required field"> |
|
|
|
<div class="required field"> |
|
|
|
<label for="smtp_host">{{.locale.Tr "admin.auths.smtphost"}}</label> |
|
|
|
<label for="smtp_host">{{ctx.Locale.Tr "admin.auths.smtphost"}}</label> |
|
|
|
<input id="smtp_host" name="smtp_host" value="{{$cfg.Host}}" required> |
|
|
|
<input id="smtp_host" name="smtp_host" value="{{$cfg.Host}}" required> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="required field"> |
|
|
|
<div class="required field"> |
|
|
|
<label for="smtp_port">{{.locale.Tr "admin.auths.smtpport"}}</label> |
|
|
|
<label for="smtp_port">{{ctx.Locale.Tr "admin.auths.smtpport"}}</label> |
|
|
|
<input id="smtp_port" name="smtp_port" value="{{$cfg.Port}}" required> |
|
|
|
<input id="smtp_port" name="smtp_port" value="{{$cfg.Port}}" required> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<label for="force_smtps"><strong>{{.locale.Tr "admin.auths.force_smtps"}}</strong></label> |
|
|
|
<label for="force_smtps"><strong>{{ctx.Locale.Tr "admin.auths.force_smtps"}}</strong></label> |
|
|
|
<input id="force_smtps" name="force_smtps" type="checkbox" {{if $cfg.ForceSMTPS}}checked{{end}}> |
|
|
|
<input id="force_smtps" name="force_smtps" type="checkbox" {{if $cfg.ForceSMTPS}}checked{{end}}> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<p class="help">{{.locale.Tr "admin.auths.force_smtps_helper"}}</p> |
|
|
|
<p class="help">{{ctx.Locale.Tr "admin.auths.force_smtps_helper"}}</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="has-tls inline field {{if not .HasTLS}}gt-hidden{{end}}"> |
|
|
|
<div class="has-tls inline field {{if not .HasTLS}}gt-hidden{{end}}"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<label><strong>{{.locale.Tr "admin.auths.skip_tls_verify"}}</strong></label> |
|
|
|
<label><strong>{{ctx.Locale.Tr "admin.auths.skip_tls_verify"}}</strong></label> |
|
|
|
<input name="skip_verify" type="checkbox" {{if $cfg.SkipVerify}}checked{{end}}> |
|
|
|
<input name="skip_verify" type="checkbox" {{if $cfg.SkipVerify}}checked{{end}}> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label for="helo_hostname">{{.locale.Tr "admin.auths.helo_hostname"}}</label> |
|
|
|
<label for="helo_hostname">{{ctx.Locale.Tr "admin.auths.helo_hostname"}}</label> |
|
|
|
<input id="helo_hostname" name="helo_hostname" value="{{$cfg.HeloHostname}}"> |
|
|
|
<input id="helo_hostname" name="helo_hostname" value="{{$cfg.HeloHostname}}"> |
|
|
|
<p class="help">{{.locale.Tr "admin.auths.helo_hostname_helper"}}</p> |
|
|
|
<p class="help">{{ctx.Locale.Tr "admin.auths.helo_hostname_helper"}}</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="inline field"> |
|
|
|
<div class="inline field"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<label for="disable_helo"><strong>{{.locale.Tr "admin.auths.disable_helo"}}</strong></label> |
|
|
|
<label for="disable_helo"><strong>{{ctx.Locale.Tr "admin.auths.disable_helo"}}</strong></label> |
|
|
|
<input id="disable_helo" name="disable_helo" type="checkbox" {{if $cfg.DisableHelo}}checked{{end}}> |
|
|
|
<input id="disable_helo" name="disable_helo" type="checkbox" {{if $cfg.DisableHelo}}checked{{end}}> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label for="allowed_domains">{{.locale.Tr "admin.auths.allowed_domains"}}</label> |
|
|
|
<label for="allowed_domains">{{ctx.Locale.Tr "admin.auths.allowed_domains"}}</label> |
|
|
|
<input id="allowed_domains" name="allowed_domains" value="{{$cfg.AllowedDomains}}"> |
|
|
|
<input id="allowed_domains" name="allowed_domains" value="{{$cfg.AllowedDomains}}"> |
|
|
|
<p class="help">{{.locale.Tr "admin.auths.allowed_domains_helper"}}</p> |
|
|
|
<p class="help">{{ctx.Locale.Tr "admin.auths.allowed_domains_helper"}}</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="optional field"> |
|
|
|
<div class="optional field"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<label for="skip_local_two_fa"><strong>{{.locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label> |
|
|
|
<label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label> |
|
|
|
<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if $cfg.SkipLocalTwoFA}}checked{{end}}> |
|
|
|
<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if $cfg.SkipLocalTwoFA}}checked{{end}}> |
|
|
|
<p class="help">{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p> |
|
|
|
<p class="help">{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{{end}} |
|
|
|
{{end}} |
|
|
@ -240,18 +240,18 @@ |
|
|
|
{{if .Source.IsPAM}} |
|
|
|
{{if .Source.IsPAM}} |
|
|
|
{{$cfg:=.Source.Cfg}} |
|
|
|
{{$cfg:=.Source.Cfg}} |
|
|
|
<div class="required field"> |
|
|
|
<div class="required field"> |
|
|
|
<label for="pam_service_name">{{.locale.Tr "admin.auths.pam_service_name"}}</label> |
|
|
|
<label for="pam_service_name">{{ctx.Locale.Tr "admin.auths.pam_service_name"}}</label> |
|
|
|
<input id="pam_service_name" name="pam_service_name" value="{{$cfg.ServiceName}}" required> |
|
|
|
<input id="pam_service_name" name="pam_service_name" value="{{$cfg.ServiceName}}" required> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label for="pam_email_domain">{{.locale.Tr "admin.auths.pam_email_domain"}}</label> |
|
|
|
<label for="pam_email_domain">{{ctx.Locale.Tr "admin.auths.pam_email_domain"}}</label> |
|
|
|
<input id="pam_email_domain" name="pam_email_domain" value="{{$cfg.EmailDomain}}"> |
|
|
|
<input id="pam_email_domain" name="pam_email_domain" value="{{$cfg.EmailDomain}}"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="optional field"> |
|
|
|
<div class="optional field"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<label for="skip_local_two_fa"><strong>{{.locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label> |
|
|
|
<label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label> |
|
|
|
<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if $cfg.SkipLocalTwoFA}}checked{{end}}> |
|
|
|
<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if $cfg.SkipLocalTwoFA}}checked{{end}}> |
|
|
|
<p class="help">{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p> |
|
|
|
<p class="help">{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{{end}} |
|
|
|
{{end}} |
|
|
@ -260,7 +260,7 @@ |
|
|
|
{{if .Source.IsOAuth2}} |
|
|
|
{{if .Source.IsOAuth2}} |
|
|
|
{{$cfg:=.Source.Cfg}} |
|
|
|
{{$cfg:=.Source.Cfg}} |
|
|
|
<div class="inline required field"> |
|
|
|
<div class="inline required field"> |
|
|
|
<label>{{.locale.Tr "admin.auths.oauth2_provider"}}</label> |
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.oauth2_provider"}}</label> |
|
|
|
<div class="ui selection type dropdown"> |
|
|
|
<div class="ui selection type dropdown"> |
|
|
|
<input type="hidden" id="oauth2_provider" name="oauth2_provider" value="{{$cfg.Provider}}" required> |
|
|
|
<input type="hidden" id="oauth2_provider" name="oauth2_provider" value="{{$cfg.Provider}}" required> |
|
|
|
<div class="text">{{.CurrentOAuth2Provider.DisplayName}}</div> |
|
|
|
<div class="text">{{.CurrentOAuth2Provider.DisplayName}}</div> |
|
|
@ -273,52 +273,52 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="required field"> |
|
|
|
<div class="required field"> |
|
|
|
<label for="oauth2_key">{{.locale.Tr "admin.auths.oauth2_clientID"}}</label> |
|
|
|
<label for="oauth2_key">{{ctx.Locale.Tr "admin.auths.oauth2_clientID"}}</label> |
|
|
|
<input id="oauth2_key" name="oauth2_key" value="{{$cfg.ClientID}}" required> |
|
|
|
<input id="oauth2_key" name="oauth2_key" value="{{$cfg.ClientID}}" required> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="required field"> |
|
|
|
<div class="required field"> |
|
|
|
<label for="oauth2_secret">{{.locale.Tr "admin.auths.oauth2_clientSecret"}}</label> |
|
|
|
<label for="oauth2_secret">{{ctx.Locale.Tr "admin.auths.oauth2_clientSecret"}}</label> |
|
|
|
<input id="oauth2_secret" name="oauth2_secret" value="{{$cfg.ClientSecret}}" required> |
|
|
|
<input id="oauth2_secret" name="oauth2_secret" value="{{$cfg.ClientSecret}}" required> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="optional field"> |
|
|
|
<div class="optional field"> |
|
|
|
<label for="oauth2_icon_url">{{.locale.Tr "admin.auths.oauth2_icon_url"}}</label> |
|
|
|
<label for="oauth2_icon_url">{{ctx.Locale.Tr "admin.auths.oauth2_icon_url"}}</label> |
|
|
|
<input id="oauth2_icon_url" name="oauth2_icon_url" value="{{$cfg.IconURL}}"> |
|
|
|
<input id="oauth2_icon_url" name="oauth2_icon_url" value="{{$cfg.IconURL}}"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="open_id_connect_auto_discovery_url required field"> |
|
|
|
<div class="open_id_connect_auto_discovery_url required field"> |
|
|
|
<label for="open_id_connect_auto_discovery_url">{{.locale.Tr "admin.auths.openIdConnectAutoDiscoveryURL"}}</label> |
|
|
|
<label for="open_id_connect_auto_discovery_url">{{ctx.Locale.Tr "admin.auths.openIdConnectAutoDiscoveryURL"}}</label> |
|
|
|
<input id="open_id_connect_auto_discovery_url" name="open_id_connect_auto_discovery_url" value="{{$cfg.OpenIDConnectAutoDiscoveryURL}}"> |
|
|
|
<input id="open_id_connect_auto_discovery_url" name="open_id_connect_auto_discovery_url" value="{{$cfg.OpenIDConnectAutoDiscoveryURL}}"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="optional field"> |
|
|
|
<div class="optional field"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<label for="skip_local_two_fa"><strong>{{.locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label> |
|
|
|
<label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label> |
|
|
|
<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if $cfg.SkipLocalTwoFA}}checked{{end}}> |
|
|
|
<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if $cfg.SkipLocalTwoFA}}checked{{end}}> |
|
|
|
<p class="help">{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p> |
|
|
|
<p class="help">{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="oauth2_use_custom_url inline field"> |
|
|
|
<div class="oauth2_use_custom_url inline field"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<label><strong>{{.locale.Tr "admin.auths.oauth2_use_custom_url"}}</strong></label> |
|
|
|
<label><strong>{{ctx.Locale.Tr "admin.auths.oauth2_use_custom_url"}}</strong></label> |
|
|
|
<input id="oauth2_use_custom_url" name="oauth2_use_custom_url" type="checkbox" {{if $cfg.CustomURLMapping}}checked{{end}}> |
|
|
|
<input id="oauth2_use_custom_url" name="oauth2_use_custom_url" type="checkbox" {{if $cfg.CustomURLMapping}}checked{{end}}> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="oauth2_use_custom_url_field oauth2_auth_url required field"> |
|
|
|
<div class="oauth2_use_custom_url_field oauth2_auth_url required field"> |
|
|
|
<label for="oauth2_auth_url">{{.locale.Tr "admin.auths.oauth2_authURL"}}</label> |
|
|
|
<label for="oauth2_auth_url">{{ctx.Locale.Tr "admin.auths.oauth2_authURL"}}</label> |
|
|
|
<input id="oauth2_auth_url" name="oauth2_auth_url" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.AuthURL}}{{end}}"> |
|
|
|
<input id="oauth2_auth_url" name="oauth2_auth_url" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.AuthURL}}{{end}}"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="oauth2_use_custom_url_field oauth2_token_url required field"> |
|
|
|
<div class="oauth2_use_custom_url_field oauth2_token_url required field"> |
|
|
|
<label for="oauth2_token_url">{{.locale.Tr "admin.auths.oauth2_tokenURL"}}</label> |
|
|
|
<label for="oauth2_token_url">{{ctx.Locale.Tr "admin.auths.oauth2_tokenURL"}}</label> |
|
|
|
<input id="oauth2_token_url" name="oauth2_token_url" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.TokenURL}}{{end}}"> |
|
|
|
<input id="oauth2_token_url" name="oauth2_token_url" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.TokenURL}}{{end}}"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="oauth2_use_custom_url_field oauth2_profile_url required field"> |
|
|
|
<div class="oauth2_use_custom_url_field oauth2_profile_url required field"> |
|
|
|
<label for="oauth2_profile_url">{{.locale.Tr "admin.auths.oauth2_profileURL"}}</label> |
|
|
|
<label for="oauth2_profile_url">{{ctx.Locale.Tr "admin.auths.oauth2_profileURL"}}</label> |
|
|
|
<input id="oauth2_profile_url" name="oauth2_profile_url" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.ProfileURL}}{{end}}"> |
|
|
|
<input id="oauth2_profile_url" name="oauth2_profile_url" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.ProfileURL}}{{end}}"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="oauth2_use_custom_url_field oauth2_email_url required field"> |
|
|
|
<div class="oauth2_use_custom_url_field oauth2_email_url required field"> |
|
|
|
<label for="oauth2_email_url">{{.locale.Tr "admin.auths.oauth2_emailURL"}}</label> |
|
|
|
<label for="oauth2_email_url">{{ctx.Locale.Tr "admin.auths.oauth2_emailURL"}}</label> |
|
|
|
<input id="oauth2_email_url" name="oauth2_email_url" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.EmailURL}}{{end}}"> |
|
|
|
<input id="oauth2_email_url" name="oauth2_email_url" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.EmailURL}}{{end}}"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="oauth2_use_custom_url_field oauth2_tenant required field"> |
|
|
|
<div class="oauth2_use_custom_url_field oauth2_tenant required field"> |
|
|
|
<label for="oauth2_tenant">{{.locale.Tr "admin.auths.oauth2_tenant"}}</label> |
|
|
|
<label for="oauth2_tenant">{{ctx.Locale.Tr "admin.auths.oauth2_tenant"}}</label> |
|
|
|
<input id="oauth2_tenant" name="oauth2_tenant" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.Tenant}}{{end}}"> |
|
|
|
<input id="oauth2_tenant" name="oauth2_tenant" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.Tenant}}{{end}}"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
@ -332,37 +332,37 @@ |
|
|
|
{{end}}{{end}} |
|
|
|
{{end}}{{end}} |
|
|
|
|
|
|
|
|
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label for="oauth2_scopes">{{.locale.Tr "admin.auths.oauth2_scopes"}}</label> |
|
|
|
<label for="oauth2_scopes">{{ctx.Locale.Tr "admin.auths.oauth2_scopes"}}</label> |
|
|
|
<input id="oauth2_scopes" name="oauth2_scopes" value="{{if $cfg.Scopes}}{{StringUtils.Join $cfg.Scopes ","}}{{end}}"> |
|
|
|
<input id="oauth2_scopes" name="oauth2_scopes" value="{{if $cfg.Scopes}}{{StringUtils.Join $cfg.Scopes ","}}{{end}}"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label for="oauth2_required_claim_name">{{.locale.Tr "admin.auths.oauth2_required_claim_name"}}</label> |
|
|
|
<label for="oauth2_required_claim_name">{{ctx.Locale.Tr "admin.auths.oauth2_required_claim_name"}}</label> |
|
|
|
<input id="oauth2_required_claim_name" name="oauth2_required_claim_name" value="{{$cfg.RequiredClaimName}}"> |
|
|
|
<input id="oauth2_required_claim_name" name="oauth2_required_claim_name" value="{{$cfg.RequiredClaimName}}"> |
|
|
|
<p class="help">{{.locale.Tr "admin.auths.oauth2_required_claim_name_helper"}}</p> |
|
|
|
<p class="help">{{ctx.Locale.Tr "admin.auths.oauth2_required_claim_name_helper"}}</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label for="oauth2_required_claim_value">{{.locale.Tr "admin.auths.oauth2_required_claim_value"}}</label> |
|
|
|
<label for="oauth2_required_claim_value">{{ctx.Locale.Tr "admin.auths.oauth2_required_claim_value"}}</label> |
|
|
|
<input id="oauth2_required_claim_value" name="oauth2_required_claim_value" value="{{$cfg.RequiredClaimValue}}"> |
|
|
|
<input id="oauth2_required_claim_value" name="oauth2_required_claim_value" value="{{$cfg.RequiredClaimValue}}"> |
|
|
|
<p class="help">{{.locale.Tr "admin.auths.oauth2_required_claim_value_helper"}}</p> |
|
|
|
<p class="help">{{ctx.Locale.Tr "admin.auths.oauth2_required_claim_value_helper"}}</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label for="oauth2_group_claim_name">{{.locale.Tr "admin.auths.oauth2_group_claim_name"}}</label> |
|
|
|
<label for="oauth2_group_claim_name">{{ctx.Locale.Tr "admin.auths.oauth2_group_claim_name"}}</label> |
|
|
|
<input id="oauth2_group_claim_name" name="oauth2_group_claim_name" value="{{$cfg.GroupClaimName}}"> |
|
|
|
<input id="oauth2_group_claim_name" name="oauth2_group_claim_name" value="{{$cfg.GroupClaimName}}"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label for="oauth2_admin_group">{{.locale.Tr "admin.auths.oauth2_admin_group"}}</label> |
|
|
|
<label for="oauth2_admin_group">{{ctx.Locale.Tr "admin.auths.oauth2_admin_group"}}</label> |
|
|
|
<input id="oauth2_admin_group" name="oauth2_admin_group" value="{{$cfg.AdminGroup}}"> |
|
|
|
<input id="oauth2_admin_group" name="oauth2_admin_group" value="{{$cfg.AdminGroup}}"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label for="oauth2_restricted_group">{{.locale.Tr "admin.auths.oauth2_restricted_group"}}</label> |
|
|
|
<label for="oauth2_restricted_group">{{ctx.Locale.Tr "admin.auths.oauth2_restricted_group"}}</label> |
|
|
|
<input id="oauth2_restricted_group" name="oauth2_restricted_group" value="{{$cfg.RestrictedGroup}}"> |
|
|
|
<input id="oauth2_restricted_group" name="oauth2_restricted_group" value="{{$cfg.RestrictedGroup}}"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label>{{.locale.Tr "admin.auths.oauth2_map_group_to_team"}}</label> |
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.oauth2_map_group_to_team"}}</label> |
|
|
|
<textarea name="oauth2_group_team_map" rows="5" placeholder='{"Developer": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{$cfg.GroupTeamMap}}</textarea> |
|
|
|
<textarea name="oauth2_group_team_map" rows="5" placeholder='{"Developer": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{$cfg.GroupTeamMap}}</textarea> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<label>{{.locale.Tr "admin.auths.oauth2_map_group_to_team_removal"}}</label> |
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.oauth2_map_group_to_team_removal"}}</label> |
|
|
|
<input name="oauth2_group_team_map_removal" type="checkbox" {{if $cfg.GroupTeamMapRemoval}}checked{{end}}> |
|
|
|
<input name="oauth2_group_team_map_removal" type="checkbox" {{if $cfg.GroupTeamMapRemoval}}checked{{end}}> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{{end}} |
|
|
|
{{end}} |
|
|
@ -372,32 +372,32 @@ |
|
|
|
{{$cfg:=.Source.Cfg}} |
|
|
|
{{$cfg:=.Source.Cfg}} |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<label for="sspi_auto_create_users"><strong>{{.locale.Tr "admin.auths.sspi_auto_create_users"}}</strong></label> |
|
|
|
<label for="sspi_auto_create_users"><strong>{{ctx.Locale.Tr "admin.auths.sspi_auto_create_users"}}</strong></label> |
|
|
|
<input id="sspi_auto_create_users" name="sspi_auto_create_users" class="sspi-auto-create-users" type="checkbox" {{if $cfg.AutoCreateUsers}}checked{{end}}> |
|
|
|
<input id="sspi_auto_create_users" name="sspi_auto_create_users" class="sspi-auto-create-users" type="checkbox" {{if $cfg.AutoCreateUsers}}checked{{end}}> |
|
|
|
<p class="help">{{.locale.Tr "admin.auths.sspi_auto_create_users_helper"}}</p> |
|
|
|
<p class="help">{{ctx.Locale.Tr "admin.auths.sspi_auto_create_users_helper"}}</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<label for="sspi_auto_activate_users"><strong>{{.locale.Tr "admin.auths.sspi_auto_activate_users"}}</strong></label> |
|
|
|
<label for="sspi_auto_activate_users"><strong>{{ctx.Locale.Tr "admin.auths.sspi_auto_activate_users"}}</strong></label> |
|
|
|
<input id="sspi_auto_activate_users" name="sspi_auto_activate_users" class="sspi-auto-activate-users" type="checkbox" {{if $cfg.AutoActivateUsers}}checked{{end}}> |
|
|
|
<input id="sspi_auto_activate_users" name="sspi_auto_activate_users" class="sspi-auto-activate-users" type="checkbox" {{if $cfg.AutoActivateUsers}}checked{{end}}> |
|
|
|
<p class="help">{{.locale.Tr "admin.auths.sspi_auto_activate_users_helper"}}</p> |
|
|
|
<p class="help">{{ctx.Locale.Tr "admin.auths.sspi_auto_activate_users_helper"}}</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<label for="sspi_strip_domain_names"><strong>{{.locale.Tr "admin.auths.sspi_strip_domain_names"}}</strong></label> |
|
|
|
<label for="sspi_strip_domain_names"><strong>{{ctx.Locale.Tr "admin.auths.sspi_strip_domain_names"}}</strong></label> |
|
|
|
<input id="sspi_strip_domain_names" name="sspi_strip_domain_names" class="sspi-strip-domain-names" type="checkbox" {{if $cfg.StripDomainNames}}checked{{end}}> |
|
|
|
<input id="sspi_strip_domain_names" name="sspi_strip_domain_names" class="sspi-strip-domain-names" type="checkbox" {{if $cfg.StripDomainNames}}checked{{end}}> |
|
|
|
<p class="help">{{.locale.Tr "admin.auths.sspi_strip_domain_names_helper"}}</p> |
|
|
|
<p class="help">{{ctx.Locale.Tr "admin.auths.sspi_strip_domain_names_helper"}}</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="required field"> |
|
|
|
<div class="required field"> |
|
|
|
<label for="sspi_separator_replacement">{{.locale.Tr "admin.auths.sspi_separator_replacement"}}</label> |
|
|
|
<label for="sspi_separator_replacement">{{ctx.Locale.Tr "admin.auths.sspi_separator_replacement"}}</label> |
|
|
|
<input id="sspi_separator_replacement" name="sspi_separator_replacement" value="{{$cfg.SeparatorReplacement}}" required> |
|
|
|
<input id="sspi_separator_replacement" name="sspi_separator_replacement" value="{{$cfg.SeparatorReplacement}}" required> |
|
|
|
<p class="help">{{.locale.Tr "admin.auths.sspi_separator_replacement_helper"}}</p> |
|
|
|
<p class="help">{{ctx.Locale.Tr "admin.auths.sspi_separator_replacement_helper"}}</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label for="sspi_default_language">{{.locale.Tr "admin.auths.sspi_default_language"}}</label> |
|
|
|
<label for="sspi_default_language">{{ctx.Locale.Tr "admin.auths.sspi_default_language"}}</label> |
|
|
|
<div class="ui language selection dropdown" id="sspi_default_language"> |
|
|
|
<div class="ui language selection dropdown" id="sspi_default_language"> |
|
|
|
<input name="sspi_default_language" type="hidden" value="{{$cfg.DefaultLanguage}}"> |
|
|
|
<input name="sspi_default_language" type="hidden" value="{{$cfg.DefaultLanguage}}"> |
|
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}} |
|
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}} |
|
|
@ -409,50 +409,50 @@ |
|
|
|
{{end}} |
|
|
|
{{end}} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<p class="help">{{.locale.Tr "admin.auths.sspi_default_language_helper"}}</p> |
|
|
|
<p class="help">{{ctx.Locale.Tr "admin.auths.sspi_default_language_helper"}}</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{{end}} |
|
|
|
{{end}} |
|
|
|
{{if .Source.IsLDAP}} |
|
|
|
{{if .Source.IsLDAP}} |
|
|
|
<div class="inline field"> |
|
|
|
<div class="inline field"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<label><strong>{{.locale.Tr "admin.auths.syncenabled"}}</strong></label> |
|
|
|
<label><strong>{{ctx.Locale.Tr "admin.auths.syncenabled"}}</strong></label> |
|
|
|
<input name="is_sync_enabled" type="checkbox" {{if .Source.IsSyncEnabled}}checked{{end}}> |
|
|
|
<input name="is_sync_enabled" type="checkbox" {{if .Source.IsSyncEnabled}}checked{{end}}> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{{end}} |
|
|
|
{{end}} |
|
|
|
<div class="inline field"> |
|
|
|
<div class="inline field"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<div class="ui checkbox"> |
|
|
|
<label><strong>{{.locale.Tr "admin.auths.activated"}}</strong></label> |
|
|
|
<label><strong>{{ctx.Locale.Tr "admin.auths.activated"}}</strong></label> |
|
|
|
<input name="is_active" type="checkbox" {{if .Source.IsActive}}checked{{end}}> |
|
|
|
<input name="is_active" type="checkbox" {{if .Source.IsActive}}checked{{end}}> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<button class="ui primary button">{{.locale.Tr "admin.auths.update"}}</button> |
|
|
|
<button class="ui primary button">{{ctx.Locale.Tr "admin.auths.update"}}</button> |
|
|
|
<button class="ui red button delete-button" data-url="{{$.Link}}/delete" data-id="{{.Source.ID}}">{{.locale.Tr "admin.auths.delete"}}</button> |
|
|
|
<button class="ui red button delete-button" data-url="{{$.Link}}/delete" data-id="{{.Source.ID}}">{{ctx.Locale.Tr "admin.auths.delete"}}</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</form> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<h4 class="ui top attached header"> |
|
|
|
<h4 class="ui top attached header"> |
|
|
|
{{.locale.Tr "admin.auths.tips"}} |
|
|
|
{{ctx.Locale.Tr "admin.auths.tips"}} |
|
|
|
</h4> |
|
|
|
</h4> |
|
|
|
<div class="ui attached segment"> |
|
|
|
<div class="ui attached segment"> |
|
|
|
<h5>GMail Settings:</h5> |
|
|
|
<h5>GMail Settings:</h5> |
|
|
|
<p>Host: smtp.gmail.com, Port: 587, Enable TLS Encryption: true</p> |
|
|
|
<p>Host: smtp.gmail.com, Port: 587, Enable TLS Encryption: true</p> |
|
|
|
|
|
|
|
|
|
|
|
<h5 class="oauth2">{{.locale.Tr "admin.auths.tips.oauth2.general"}}:</h5> |
|
|
|
<h5 class="oauth2">{{ctx.Locale.Tr "admin.auths.tips.oauth2.general"}}:</h5> |
|
|
|
<p class="oauth2">{{.locale.Tr "admin.auths.tips.oauth2.general.tip"}} <b id="oauth2-callback-url"></b></p> |
|
|
|
<p class="oauth2">{{ctx.Locale.Tr "admin.auths.tips.oauth2.general.tip"}} <b id="oauth2-callback-url"></b></p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="ui g-modal-confirm delete modal"> |
|
|
|
<div class="ui g-modal-confirm delete modal"> |
|
|
|
<div class="header"> |
|
|
|
<div class="header"> |
|
|
|
{{svg "octicon-trash"}} |
|
|
|
{{svg "octicon-trash"}} |
|
|
|
{{.locale.Tr "admin.auths.delete_auth_title"}} |
|
|
|
{{ctx.Locale.Tr "admin.auths.delete_auth_title"}} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="content"> |
|
|
|
<div class="content"> |
|
|
|
<p>{{.locale.Tr "admin.auths.delete_auth_desc"}}</p> |
|
|
|
<p>{{ctx.Locale.Tr "admin.auths.delete_auth_desc"}}</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{{template "base/modal_actions_confirm" .}} |
|
|
|
{{template "base/modal_actions_confirm" .}} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|