feat(EnvelopeLocked): Kontrollkästchen hinzugefügt, um TFA per SMS auswählen zu können oder nicht, wenn tfa aktiviert ist.
- Das Kontrollkästchen ist standardmäßig nicht aktiviert. - Das Kontrollkästchen ist deaktiviert, wenn der Benutzer keine Telefonnummer hat.
This commit is contained in:
parent
4af1534194
commit
90c6e87224
@ -19,7 +19,6 @@ using Ganss.Xss;
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using EnvelopeGenerator.Application.DTOs;
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
using DigitalData.Core.Client;
|
using DigitalData.Core.Client;
|
||||||
using DevExpress.Utils.About;
|
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Web.Controllers
|
namespace EnvelopeGenerator.Web.Controllers
|
||||||
{
|
{
|
||||||
@ -140,7 +139,10 @@ namespace EnvelopeGenerator.Web.Controllers
|
|||||||
ViewData["UserCulture"] = _cultures[UserLanguage];
|
ViewData["UserCulture"] = _cultures[UserLanguage];
|
||||||
|
|
||||||
return await _envRcvService.ReadByEnvelopeReceiverIdAsync(envelopeReceiverId: envelopeReceiverId).ThenAsync(
|
return await _envRcvService.ReadByEnvelopeReceiverIdAsync(envelopeReceiverId: envelopeReceiverId).ThenAsync(
|
||||||
Success: er => View().WithData("EnvelopeKey", envelopeReceiverId),
|
Success: er => View()
|
||||||
|
.WithData("EnvelopeKey", envelopeReceiverId)
|
||||||
|
.WithData("TFAEnabled", er.TFAEnabled)
|
||||||
|
.WithData("HasPhoneNumber", er.HasPhoneNumber),
|
||||||
Fail: IActionResult (messages, notices) =>
|
Fail: IActionResult (messages, notices) =>
|
||||||
{
|
{
|
||||||
_logger.LogNotice(notices);
|
_logger.LogNotice(notices);
|
||||||
@ -176,7 +178,7 @@ namespace EnvelopeGenerator.Web.Controllers
|
|||||||
//check access code
|
//check access code
|
||||||
EnvelopeResponse response = await envelopeOldService.LoadEnvelope(envelopeReceiverId);
|
EnvelopeResponse response = await envelopeOldService.LoadEnvelope(envelopeReceiverId);
|
||||||
|
|
||||||
return await _envRcvService.ReadWithSecretByUuidSignatureAsync(uuid: uuid, signature: signature).ThenAsync<EnvelopeReceiverSecretDto, IActionResult>(
|
return await _envRcvService.ReadWithSecretByUuidSignatureAsync(uuid: uuid, signature: signature).ThenAsync(
|
||||||
SuccessAsync: async er_secret =>
|
SuccessAsync: async er_secret =>
|
||||||
{
|
{
|
||||||
async Task<IActionResult> SendSmsView()
|
async Task<IActionResult> SendSmsView()
|
||||||
|
|||||||
@ -8,6 +8,8 @@
|
|||||||
bool viaSms = ViewData["ViaSms"] is bool _viaSms && _viaSms;
|
bool viaSms = ViewData["ViaSms"] is bool _viaSms && _viaSms;
|
||||||
var accessCodeName = viaSms ? "smsCode" : "accessCode";
|
var accessCodeName = viaSms ? "smsCode" : "accessCode";
|
||||||
DateTime? expiration = ViewData["Expiration"] is DateTime _expiration ? _expiration : null;
|
DateTime? expiration = ViewData["Expiration"] is DateTime _expiration ? _expiration : null;
|
||||||
|
bool tfaEnabled = ViewData["TFAEnabled"] is bool _tfaEnabled && _tfaEnabled;
|
||||||
|
bool hasPhoneNumber = ViewData["HasPhoneNumber"] is bool _hasPhoneNumber && _hasPhoneNumber;
|
||||||
}
|
}
|
||||||
<div class="page container py-4 px-4">
|
<div class="page container py-4 px-4">
|
||||||
<header class="text-center">
|
<header class="text-center">
|
||||||
@ -37,6 +39,13 @@
|
|||||||
login
|
login
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
@if (tfaEnabled)
|
||||||
|
{
|
||||||
|
<div class="form-check form-switch tfa-sms">
|
||||||
|
<input class="form-check-input" type="checkbox" role="switch" id="flexSwitchCheckChecked" @(hasPhoneNumber ? string.Empty : "disabled")>
|
||||||
|
<label class="form-check-label" for="flexSwitchCheckChecked">2FA per SMS</label>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
@if (expiration is not null)
|
@if (expiration is not null)
|
||||||
{
|
{
|
||||||
<div id="sms-timer" class="alert alert-primary" role="alert">00:00</div>
|
<div id="sms-timer" class="alert alert-primary" role="alert">00:00</div>
|
||||||
|
|||||||
@ -448,6 +448,16 @@ footer#page-footer {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form-check.tfa-sms {
|
||||||
|
margin-left: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-check.tfa-sms .form-check-label {
|
||||||
|
font-size: 0.875rem;
|
||||||
|
font-weight: 500;
|
||||||
|
margin-left: -.1rem;
|
||||||
|
}
|
||||||
|
|
||||||
/*.flag-dropdown button {
|
/*.flag-dropdown button {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}*/
|
}*/
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user