mirror of
https://github.com/bitwarden/server
synced 2026-01-06 10:34:01 +00:00
[PM-15637] Add Email Notification Templates and Logic for Device Approval Requests (#5270)
* Add device approval notification email templates * Add DeviceApprovalRequestedViewModel for device approval notifications * Add method to send device approval requested notification email * Send email notification to Organization Admins when adding a new admin approval auth request * Add tests for device approval notification email sending in AuthRequestServiceTests * fix(email-templates): Remove unnecessary triple braces from user name variable in device approval notification emails * Add feature flag for admin notifications on device approval requests * Add logging for skipped admin notifications on device approval requests
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
{{#>FullHtmlLayout}}
|
||||
<table width="100%" cellpadding="0" cellspacing="0"
|
||||
style="margin: 0; box-sizing: border-box; ">
|
||||
<tr
|
||||
style="margin: 0; box-sizing: border-box; ">
|
||||
<td class="content-block last"
|
||||
style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; margin: 0; -webkit-font-smoothing: antialiased; padding: 0 0 10px; -webkit-text-size-adjust: none;"
|
||||
valign="top">
|
||||
{{UserNameRequestingAccess}} has sent a device approval request. Review login requests to allow the member to finish logging in.
|
||||
<br class="line-break" />
|
||||
<br class="line-break" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="margin: 0; box-sizing: border-box; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;">
|
||||
<td class="content-block" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; margin: 0; -webkit-font-smoothing: antialiased; padding: 0 0 10px; -webkit-text-size-adjust: none; text-align: center;" valign="top" align="center">
|
||||
<a href="{{Url}}" clicktracking=off target="_blank" rel="noopener noreferrer" style="color: #ffffff; text-decoration: none; text-align: center; cursor: pointer; display: inline-block; border-radius: 5px; background-color: #175DDC; border-color: #175DDC; border-style: solid; border-width: 10px 20px; margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;">
|
||||
Review request
|
||||
</a>
|
||||
<br class="line-break" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{{/FullHtmlLayout}}
|
||||
@@ -0,0 +1,5 @@
|
||||
{{#>BasicTextLayout}}
|
||||
{{UserNameRequestingAccess}} has sent a device approval request. Review login requests to allow the member to finish logging in.
|
||||
|
||||
{{Url}}
|
||||
{{/BasicTextLayout}}
|
||||
@@ -0,0 +1,29 @@
|
||||
{{#>FullHtmlLayout}}
|
||||
<table width="100%" cellpadding="0" cellspacing="0"
|
||||
style="margin: 0; box-sizing: border-box; ">
|
||||
<tr style="margin: 0; box-sizing: border-box; ">
|
||||
<td class="content-block last"
|
||||
style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; margin: 0; -webkit-font-smoothing: antialiased; padding: 0 0 10px; -webkit-text-size-adjust: none;"
|
||||
valign="top">
|
||||
{{UserNameRequestingAccess}} has sent a device approval request. Review login requests to allow the member to finish logging in.
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="margin: 0; box-sizing: border-box; ">
|
||||
<td class="content-block last"
|
||||
style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; margin: 0; -webkit-font-smoothing: antialiased; padding: 0 0 10px; -webkit-text-size-adjust: none;"
|
||||
valign="top">
|
||||
To review requests, log in to your self-hosted instance → navigate to the Admin Console → select Device Approvals
|
||||
<br class="line-break" />
|
||||
<br class="line-break" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="margin: 0; box-sizing: border-box; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;">
|
||||
<td class="content-block" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; margin: 0; -webkit-font-smoothing: antialiased; padding: 0 0 10px; -webkit-text-size-adjust: none; text-align: center;" valign="top" align="center">
|
||||
<a href="{{Url}}" clicktracking=off target="_blank" rel="noopener noreferrer" style="color: #ffffff; text-decoration: none; text-align: center; cursor: pointer; display: inline-block; border-radius: 5px; background-color: #175DDC; border-color: #175DDC; border-style: solid; border-width: 10px 20px; margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;">
|
||||
Review request
|
||||
</a>
|
||||
<br class="line-break" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{{/FullHtmlLayout}}
|
||||
@@ -0,0 +1,7 @@
|
||||
{{#>BasicTextLayout}}
|
||||
{{UserNameRequestingAccess}} has sent a device approval request. Review login requests to allow the member to finish logging in.
|
||||
|
||||
To review requests, log in to your self-hosted instance -> navigate to the Admin Console -> select Device Approvals.
|
||||
|
||||
{{Url}}
|
||||
{{/BasicTextLayout}}
|
||||
Reference in New Issue
Block a user