refactor(EnvelopeController): add logic to check the claims with role
This commit is contained in:
parent
8059e0aae4
commit
a8a73724e6
@ -193,7 +193,13 @@ public class EnvelopeController : ViewControllerBase
|
||||
|
||||
private async Task<IActionResult> CreateEnvelopeLockedView(EnvelopeReceiverDto er, CancellationToken cancel)
|
||||
{
|
||||
if (User.IsInRole(ReceiverRole.FullyAuth))
|
||||
var uuidClaim = User.GetAuthEnvelopeUuid();
|
||||
var signatureClaim = User.GetAuthReceiverSignature();
|
||||
if (uuidClaim is not null
|
||||
&& uuidClaim == er.Envelope?.Uuid
|
||||
&& signatureClaim is not null
|
||||
&& signatureClaim == er.Receiver?.Signature
|
||||
&& User.IsInRole(ReceiverRole.FullyAuth))
|
||||
{
|
||||
if (er.Envelope!.Documents?.FirstOrDefault() is DocumentDto doc && doc.ByteData is not null)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user