Skip to content

Commit a7d78c7

Browse files
committed
Added checks for email and user name for examples 20, 22 and 23
1 parent 1e806e7 commit a7d78c7

File tree

9 files changed

+89
-75
lines changed

9 files changed

+89
-75
lines changed

launcher-csharp/eSignature/Controllers/RecipientAuthIDV.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ public RecipientAuthIdv(DsConfiguration config, LauncherTexts launcherTexts, IRe
2727
[SetViewBag]
2828
public IActionResult Create(string signerEmail, string signerName, string ccEmail, string ccName)
2929
{
30+
if (signerEmail == this.Config.SignerEmail)
31+
{
32+
this.ViewBag.errorCode = "400";
33+
this.ViewBag.errorMessage = this.LauncherTexts.ManifestStructure.SupportingTexts.IdenticalEmailsNotAllowedErrorMessage;
34+
this.ViewBag.SupportingTexts = this.LauncherTexts.ManifestStructure.SupportingTexts;
35+
36+
return this.View("Error");
37+
}
38+
3039
try
3140
{
3241
// Check the token with minimal buffer time.

launcher-csharp/eSignature/Controllers/RecipientAuthKBA.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ public RecipientAuthKba(DsConfiguration config, LauncherTexts launcherTexts, IRe
2626
[SetViewBag]
2727
public IActionResult Create(string signerEmail, string signerName)
2828
{
29+
if (signerEmail == this.Config.SignerEmail)
30+
{
31+
this.ViewBag.errorCode = "400";
32+
this.ViewBag.errorMessage = this.LauncherTexts.ManifestStructure.SupportingTexts.IdenticalEmailsNotAllowedErrorMessage;
33+
this.ViewBag.SupportingTexts = this.LauncherTexts.ManifestStructure.SupportingTexts;
34+
35+
return this.View("Error");
36+
}
37+
2938
// Check the token with minimal buffer time.
3039
bool tokenOk = this.CheckToken(3);
3140
if (!tokenOk)

launcher-csharp/eSignature/Controllers/RecipientAuthPhone.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ public RecipientAuthPhone(DsConfiguration config, LauncherTexts launcherTexts, I
2727
[SetViewBag]
2828
public IActionResult Create(string signerEmail, string signerName, string signerCountryCode, string signerPhoneNumber)
2929
{
30+
if (signerEmail == this.Config.SignerEmail)
31+
{
32+
this.ViewBag.errorCode = "400";
33+
this.ViewBag.errorMessage = this.LauncherTexts.ManifestStructure.SupportingTexts.IdenticalEmailsNotAllowedErrorMessage;
34+
this.ViewBag.SupportingTexts = this.LauncherTexts.ManifestStructure.SupportingTexts;
35+
36+
return this.View("Error");
37+
}
38+
3039
try
3140
{
3241
// Check the token with minimal buffer time.

launcher-csharp/eSignature/Models/ModelsToReadManifest/SupportingTexts.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ public class SupportingTexts
5050
[JsonProperty("ContactSupportToEnableFeature")]
5151
public string ContactSupportToEnableFeature { get; set; }
5252

53+
[JsonProperty("IdenticalEmailsNotAllowedErrorMessage")]
54+
public string IdenticalEmailsNotAllowedErrorMessage { get; set; }
55+
5356
[JsonProperty("LoginPage")]
5457
public LoginPage LoginPage { get; set; }
5558

launcher-csharp/eSignature/Views/Eg020SmsAuth/eg020.cshtml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@
5151
name="signerEmail"
5252
aria-describedby="emailHelp"
5353
placeholder="@ViewBag.CodeExampleText.Forms[formNumber].Inputs[emailInputNumber].InputPlaceholder"
54-
required
55-
value="@ViewBag.Locals.DsConfig.SignerEmail">
54+
required>
5655

5756
<small id="emailHelp" class="form-text text-muted">
5857
@Html.Raw(ViewBag.SupportingTexts.HelpingTexts.EmailWontBeShared)
@@ -68,7 +67,6 @@
6867
id="signerName"
6968
placeholder="@ViewBag.CodeExampleText.Forms[formNumber].Inputs[nameInputNumber].InputPlaceholder"
7069
name="signerName"
71-
value="@ViewBag.Locals.DsConfig.SignerName"
7270
required>
7371
</div>
7472

launcher-csharp/eSignature/Views/RecipientAuthIDV/eg023.cshtml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
</p>
2222

2323
<form class="eg" action="" method="post" data-busy="form">
24-
<p>@Html.Raw(ViewBag.CodeExampleText.Notes)</p>
25-
2624
<div class="form-group">
2725
<label for="signerEmail">
2826
@Html.Raw(ViewBag.CodeExampleText.Forms[formNumber].Inputs[signerEmailInputNumber].InputName)
@@ -34,8 +32,7 @@
3432
name="signerEmail"
3533
aria-describedby="emailHelp"
3634
placeholder="@ViewBag.CodeExampleText.Forms[formNumber].Inputs[signerEmailInputNumber].InputPlaceholder"
37-
required
38-
value="@ViewBag.Locals.DsConfig.SignerEmail">
35+
required>
3936

4037
<small id="emailHelp" class="form-text text-muted">
4138
@Html.Raw(ViewBag.SupportingTexts.HelpingTexts.EmailWontBeShared)
@@ -51,7 +48,6 @@
5148
id="signerName"
5249
placeholder="@ViewBag.CodeExampleText.Forms[formNumber].Inputs[signerNameInputNumber].InputPlaceholder"
5350
name="signerName"
54-
value="@ViewBag.Locals.DsConfig.SignerName"
5551
required />
5652
</div>
5753

launcher-csharp/eSignature/Views/RecipientAuthKBA/eg022.cshtml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
</p>
2222

2323
<form class="eg" action="" method="post" data-busy="form">
24-
<p>@Html.Raw(ViewBag.CodeExampleText.Notes)</p>
25-
2624
<div class="form-group">
2725
<label for="signerEmail">
2826
@Html.Raw(ViewBag.CodeExampleText.Forms[formNumber].Inputs[signerEmailInputNumber].InputName)
@@ -34,8 +32,7 @@
3432
name="signerEmail"
3533
aria-describedby="emailHelp"
3634
placeholder="@ViewBag.CodeExampleText.Forms[formNumber].Inputs[signerEmailInputNumber].InputPlaceholder"
37-
required
38-
value="@ViewBag.Locals.DsConfig.SignerEmail">
35+
required>
3936
<small id="emailHelp" class="form-text text-muted">
4037
@Html.Raw(ViewBag.SupportingTexts.HelpingTexts.EmailWontBeShared)
4138
</small>
@@ -50,7 +47,6 @@
5047
id="signerName"
5148
placeholder="@ViewBag.CodeExampleText.Forms[formNumber].Inputs[signerNameInputNumber].InputPlaceholder"
5249
name="signerName"
53-
value="@ViewBag.Locals.DsConfig.SignerName"
5450
required />
5551
</div>
5652
<input type="hidden" name="_csrf" value="<%- csrfToken %>">

launcher-csharp/eSignature/Views/RecipientAuthPhone/eg020.cshtml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@
6565
name="signerEmail"
6666
aria-describedby="emailHelp"
6767
placeholder="@ViewBag.CodeExampleText.Forms[formNumber].Inputs[signerEmailInputNumber].InputPlaceholder"
68-
required
69-
value="@ViewBag.Locals.DsConfig.SignerEmail">
68+
required>
7069

7170
<small id="emailHelp" class="form-text text-muted">
7271
@Html.Raw(ViewBag.SupportingTexts.HelpingTexts.EmailWontBeShared)
@@ -81,7 +80,6 @@
8180
id="signerName"
8281
placeholder="@ViewBag.CodeExampleText.Forms[formNumber].Inputs[signerNameInputNumber].InputPlaceholder"
8382
name="signerName"
84-
value="@ViewBag.Locals.DsConfig.SignerName"
8583
required />
8684
</div>
8785
<input type="hidden" name="_csrf" value="<%- csrfToken %>">

0 commit comments

Comments
 (0)