diff options
author | zeripath <art27@cantab.net> | 2021-09-17 12:43:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-17 12:43:47 +0100 |
commit | 27b351aba564804f65e5574919a88d6194c75256 (patch) | |
tree | fa4857e05e344693e629aa14b05b7f8ffba42cfc /templates | |
parent | f96d0d3d5b2acb3545c3a2ced7972879a9750c9d (diff) | |
download | gitea-27b351aba564804f65e5574919a88d6194c75256.tar.gz gitea-27b351aba564804f65e5574919a88d6194c75256.zip |
Make LDAP be able to skip local 2FA (#16954)
This PR extends #16594 to allow LDAP to be able to be set to skip local 2FA too. The technique used here would be extensible to PAM and SMTP sources.
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/admin/auth/edit.tmpl | 7 | ||||
-rw-r--r-- | templates/admin/auth/source/ldap.tmpl | 13 |
2 files changed, 20 insertions, 0 deletions
diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl index 3e21710353..9ff8066384 100644 --- a/templates/admin/auth/edit.tmpl +++ b/templates/admin/auth/edit.tmpl @@ -147,6 +147,13 @@ </div> </div> {{end}} + <div class="optional field"> + <div class="ui checkbox"> + <label for="skip_local_two_fa"><strong>{{.i18n.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}}> + <p class="help">{{.i18n.Tr "admin.auths.skip_local_two_fa_helper"}}</p> + </div> + </div> <div class="inline field"> <div class="ui checkbox"> <label for="allow_deactivate_all"><strong>{{.i18n.Tr "admin.auths.allow_deactivate_all"}}</strong></label> diff --git a/templates/admin/auth/source/ldap.tmpl b/templates/admin/auth/source/ldap.tmpl index 295e001cf4..b8018f5b54 100644 --- a/templates/admin/auth/source/ldap.tmpl +++ b/templates/admin/auth/source/ldap.tmpl @@ -111,4 +111,17 @@ <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> + <div class="optional field"> + <div class="ui checkbox"> + <label for="skip_local_two_fa"><strong>{{.i18n.Tr "admin.auths.skip_local_two_fa"}}</strong></label> + <input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}> + <p class="help">{{.i18n.Tr "admin.auths.skip_local_two_fa_helper"}}</p> + </div> + </div> + <div class="inline field"> + <div class="ui checkbox"> + <label for="allow_deactivate_all"><strong>{{.i18n.Tr "admin.auths.allow_deactivate_all"}}</strong></label> + <input id="allow_deactivate_all" name="allow_deactivate_all" type="checkbox" {{if .allow_deactivate_all}}checked{{end}}> + </div> + </div> </div> |