Restrict rejection check to ReadAndSign envelopes
Previously, rejection logic was applied to all envelopes. Now, the check for rejected receivers and the "EnvelopeRejected" view are only executed if the envelope is of the "ReadAndSign" type, preventing unnecessary rejection handling for other envelope types.
This commit is contained in:
@@ -80,12 +80,15 @@ public class EnvelopeController : ViewControllerBase
|
|||||||
|
|
||||||
#region Rejected or Signed
|
#region Rejected or Signed
|
||||||
//check rejection
|
//check rejection
|
||||||
var rejRcvrs = await _historyService.ReadRejectingReceivers(er.Envelope!.Id);
|
if (er.Envelope.IsReadAndSign())
|
||||||
if (rejRcvrs.Any())
|
|
||||||
{
|
{
|
||||||
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
var rejRcvrs = await _historyService.ReadRejectingReceivers(er.Envelope!.Id);
|
||||||
ViewBag.IsExt = !rejRcvrs.Contains(er.Receiver); //external if the current user is not rejected
|
if (rejRcvrs.Any())
|
||||||
return View("EnvelopeRejected", er);
|
{
|
||||||
|
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
||||||
|
ViewBag.IsExt = !rejRcvrs.Contains(er.Receiver); //external if the current user is not rejected
|
||||||
|
return View("EnvelopeRejected", er);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//check if it has already signed
|
//check if it has already signed
|
||||||
|
|||||||
Reference in New Issue
Block a user