summaryrefslogtreecommitdiffstats
path: root/templates/mail
diff options
context:
space:
mode:
authorGusted <postmaster@gusted.xyz>2024-07-26 19:26:44 +0200
committerGusted <postmaster@gusted.xyz>2024-07-26 19:49:22 +0200
commita7e96aae66169f5d6f502710aeeaa563eb856534 (patch)
treecf430b583fb528933d210858ab78356fb4ad599d /templates/mail
parentMerge pull request 'chore(renovate): fix renovate grouping' (#4700) from vice... (diff)
downloadforgejo-a7e96aae66169f5d6f502710aeeaa563eb856534.tar.xz
forgejo-a7e96aae66169f5d6f502710aeeaa563eb856534.zip
[SEC] Notify owner about TOTP enrollment
- In the spirit of #4635 - Notify the owner when their account is getting enrolled into TOTP. The message is changed according if they have security keys or not. - Integration test added.
Diffstat (limited to 'templates/mail')
-rw-r--r--templates/mail/auth/totp_enrolled.tmpl15
1 files changed, 15 insertions, 0 deletions
diff --git a/templates/mail/auth/totp_enrolled.tmpl b/templates/mail/auth/totp_enrolled.tmpl
new file mode 100644
index 0000000000..9c665e028c
--- /dev/null
+++ b/templates/mail/auth/totp_enrolled.tmpl
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta name="format-detection" content="telephone=no,date=no,address=no,email=no,url=no">
+</head>
+
+<body>
+ <p>{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}</p><br>
+ {{if .HasWebAuthn}}<p>{{.locale.Tr "mail.totp_enrolled.text_1.has_webauthn"}}</p>{{else}}<p>{{.locale.Tr "mail.totp_enrolled.text_1.no_webauthn"}}</p>{{end}}<br>
+ <p>{{.locale.Tr "mail.account_security_caution.text_1"}}</p><br>
+ <p>{{.locale.Tr "mail.account_security_caution.text_2"}}</p><br>
+ {{template "common/footer_simple" .}}
+</body>
+</html>