Compare commits
15 Commits
82831991b0
...
feat/wisag
| Author | SHA1 | Date | |
|---|---|---|---|
| 7271106892 | |||
| d02149cb6b | |||
| 8d8b9a6ea0 | |||
| 96a2abdda8 | |||
| 6cc2d77fc0 | |||
| 7cb1546934 | |||
| 60db762bcc | |||
| 5e840db04c | |||
| e724a74f9c | |||
| 48b7afcdc1 | |||
| 717da90c01 | |||
| 8054bb377d | |||
| 200258ff73 | |||
| fa73d939b5 | |||
| ca9e25abcb |
@@ -75,10 +75,12 @@ public record EnvelopeDto : IEnvelope
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int? EnvelopeTypeId { get; set; }
|
public int? EnvelopeTypeId { get; set; }
|
||||||
|
|
||||||
|
// TODO: use ReadAndConfirm property name
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool ReadOnly => EnvelopeTypeId == 2;
|
[Obsolete("Use EnvelopeExtensions.IsReadAndConfirm extension metot instead.")]
|
||||||
|
public bool ReadOnly => this.IsReadAndConfirm();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -11,5 +11,10 @@
|
|||||||
{
|
{
|
||||||
return envelope.EnvelopeTypeId == 2;
|
return envelope.EnvelopeTypeId == 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool IsReadAndSign(this IEnvelope envelope)
|
||||||
|
{
|
||||||
|
return envelope.EnvelopeTypeId != 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,6 +6,7 @@ using EnvelopeGenerator.Application.Common.Notifications.DocSigned;
|
|||||||
using EnvelopeGenerator.Application.EnvelopeReceivers.Queries;
|
using EnvelopeGenerator.Application.EnvelopeReceivers.Queries;
|
||||||
using EnvelopeGenerator.Application.Histories.Queries;
|
using EnvelopeGenerator.Application.Histories.Queries;
|
||||||
using EnvelopeGenerator.Domain.Constants;
|
using EnvelopeGenerator.Domain.Constants;
|
||||||
|
using EnvelopeGenerator.Domain.Interfaces;
|
||||||
using EnvelopeGenerator.Web.Extensions;
|
using EnvelopeGenerator.Web.Extensions;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
using Microsoft.AspNetCore.Authentication;
|
using Microsoft.AspNetCore.Authentication;
|
||||||
@@ -65,7 +66,7 @@ public class AnnotationController : ControllerBase
|
|||||||
// Again check if receiver has already signed
|
// Again check if receiver has already signed
|
||||||
if (await _mediator.IsSignedAsync(uuid, signature, cancel))
|
if (await _mediator.IsSignedAsync(uuid, signature, cancel))
|
||||||
return Problem(statusCode: 409);
|
return Problem(statusCode: 409);
|
||||||
else if (await _mediator.AnyHistoryAsync(uuid, new[] { EnvelopeStatus.EnvelopeRejected, EnvelopeStatus.DocumentRejected }, cancel))
|
else if (er.Envelope.IsReadAndSign() && await _mediator.AnyHistoryAsync(uuid, new[] { EnvelopeStatus.EnvelopeRejected, EnvelopeStatus.DocumentRejected }, cancel))
|
||||||
return Problem(statusCode: 423);
|
return Problem(statusCode: 423);
|
||||||
|
|
||||||
var docSignedNotification = await _mediator
|
var docSignedNotification = await _mediator
|
||||||
@@ -80,6 +81,7 @@ public class AnnotationController : ControllerBase
|
|||||||
return Ok();
|
return Ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO: add logic to check if it is already rejected or signed
|
||||||
[Authorize(Roles = Role.ReceiverFull)]
|
[Authorize(Roles = Role.ReceiverFull)]
|
||||||
[HttpPost("reject")]
|
[HttpPost("reject")]
|
||||||
[Obsolete("Use DigitalData.Core.Exceptions and .Middleware")]
|
[Obsolete("Use DigitalData.Core.Exceptions and .Middleware")]
|
||||||
@@ -100,7 +102,7 @@ public class AnnotationController : ControllerBase
|
|||||||
if (envRcvRes.IsFailed)
|
if (envRcvRes.IsFailed)
|
||||||
{
|
{
|
||||||
_logger.LogNotice(envRcvRes.Notices);
|
_logger.LogNotice(envRcvRes.Notices);
|
||||||
return Unauthorized("you are not authirized");
|
return Unauthorized();
|
||||||
}
|
}
|
||||||
|
|
||||||
var histRes = await _histService.RecordAsync(envRcvRes.Data.EnvelopeId, userReference: mail, EnvelopeStatus.DocumentRejected, comment: reason);
|
var histRes = await _histService.RecordAsync(envRcvRes.Data.EnvelopeId, userReference: mail, EnvelopeStatus.DocumentRejected, comment: reason);
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ using EnvelopeGenerator.Application.Common.Interfaces.Services;
|
|||||||
using EnvelopeGenerator.Application.EnvelopeReceivers.Queries;
|
using EnvelopeGenerator.Application.EnvelopeReceivers.Queries;
|
||||||
using EnvelopeGenerator.Application.Resources;
|
using EnvelopeGenerator.Application.Resources;
|
||||||
using EnvelopeGenerator.Domain.Constants;
|
using EnvelopeGenerator.Domain.Constants;
|
||||||
|
using EnvelopeGenerator.Domain.Interfaces;
|
||||||
using EnvelopeGenerator.PdfEditor;
|
using EnvelopeGenerator.PdfEditor;
|
||||||
using EnvelopeGenerator.Web.Extensions;
|
using EnvelopeGenerator.Web.Extensions;
|
||||||
using EnvelopeGenerator.Web.Models;
|
using EnvelopeGenerator.Web.Models;
|
||||||
@@ -78,13 +79,18 @@ public class EnvelopeController : ViewControllerBase
|
|||||||
return this.ViewEnvelopeNotFound();
|
return this.ViewEnvelopeNotFound();
|
||||||
|
|
||||||
#region Rejected or Signed
|
#region Rejected or Signed
|
||||||
//check rejection
|
|
||||||
var rejRcvrs = await _historyService.ReadRejectingReceivers(er.Envelope!.Id);
|
var rejRcvrs = await _historyService.ReadRejectingReceivers(er.Envelope!.Id);
|
||||||
if (rejRcvrs.Any())
|
if (rejRcvrs.Any())
|
||||||
{
|
{
|
||||||
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
||||||
ViewBag.IsExt = !rejRcvrs.Contains(er.Receiver); //external if the current user is not rejected
|
var isExt = !rejRcvrs.Where(rcv => rcv.Id == er.Receiver!.Id).Any(); //external if the current user is not rejected
|
||||||
return View("EnvelopeRejected", er);
|
|
||||||
|
if (er.Envelope.IsReadAndSign() || !isExt)
|
||||||
|
{
|
||||||
|
//TODO: Normally assigned to the isExt variable. However, since the relevant keys are not defined in the resx files, it was assigned false. Fix this.
|
||||||
|
ViewBag.IsExt = true;
|
||||||
|
return View("EnvelopeRejected", er);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//check if it has already signed
|
//check if it has already signed
|
||||||
@@ -162,13 +168,19 @@ public class EnvelopeController : ViewControllerBase
|
|||||||
}
|
}
|
||||||
var er_secret = er_secret_res.Data;
|
var er_secret = er_secret_res.Data;
|
||||||
|
|
||||||
//check rejection
|
|
||||||
var rejRcvrs = await _historyService.ReadRejectingReceivers(er_secret.Envelope!.Id);
|
var rejRcvrs = await _historyService.ReadRejectingReceivers(er_secret.Envelope!.Id);
|
||||||
if (rejRcvrs.Any())
|
if (rejRcvrs.Any())
|
||||||
{
|
{
|
||||||
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
||||||
ViewBag.IsExt = !rejRcvrs.Contains(er_secret.Receiver); //external if the current user is not rejected
|
var isExt = !rejRcvrs.Where(rcv => rcv.Id == er_secret.Receiver!.Id).Any(); //external if the current user is not rejected
|
||||||
return View("EnvelopeRejected", er_secret);
|
|
||||||
|
//check rejection if the envelope is read-and-sign or non-external (internal)
|
||||||
|
if (er_secret.Envelope.IsReadAndSign() || !isExt)
|
||||||
|
{
|
||||||
|
//TODO: Normally assigned to the isExt variable. However, since the relevant keys are not defined in the resx files, it was assigned false. Fix this.
|
||||||
|
ViewBag.IsExt = true;
|
||||||
|
return View("EnvelopeRejected", er_secret);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// show envelope if already logged in
|
// show envelope if already logged in
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
|
<TargetFrameworks>net7.0;net8.0;net9.0</TargetFrameworks>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<PackageId>EnvelopeGenerator.Web</PackageId>
|
<PackageId>EnvelopeGenerator.Web</PackageId>
|
||||||
@@ -12,9 +12,9 @@
|
|||||||
<PackageTags>digital data envelope generator web</PackageTags>
|
<PackageTags>digital data envelope generator web</PackageTags>
|
||||||
<Description>EnvelopeGenerator.Web is an ASP.NET MVC application developed to manage signing processes. It uses Entity Framework Core (EF Core) for database operations. The user interface for signing processes is developed with Razor View Engine (.cshtml files) and JavaScript under wwwroot, integrated with PSPDFKit. This integration allows users to view and sign documents seamlessly.</Description>
|
<Description>EnvelopeGenerator.Web is an ASP.NET MVC application developed to manage signing processes. It uses Entity Framework Core (EF Core) for database operations. The user interface for signing processes is developed with Razor View Engine (.cshtml files) and JavaScript under wwwroot, integrated with PSPDFKit. This integration allows users to view and sign documents seamlessly.</Description>
|
||||||
<ApplicationIcon>Assets\icon.ico</ApplicationIcon>
|
<ApplicationIcon>Assets\icon.ico</ApplicationIcon>
|
||||||
<Version>3.12.0</Version> <!-- NuGet package version -->
|
<Version>3.12.2</Version> <!-- NuGet package version -->
|
||||||
<AssemblyVersion>3.12.0.0</AssemblyVersion> <!-- Assembly version for API compatibility -->
|
<AssemblyVersion>3.12.2.0</AssemblyVersion> <!-- Assembly version for API compatibility -->
|
||||||
<FileVersion>3.12.0.0</FileVersion> <!-- Windows file version -->
|
<FileVersion>3.12.2.0</FileVersion> <!-- Windows file version -->
|
||||||
<Copyright>Copyright © 2025 Digital Data GmbH. All rights reserved.</Copyright>
|
<Copyright>Copyright © 2025 Digital Data GmbH. All rights reserved.</Copyright>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
@@ -626,7 +626,6 @@
|
|||||||
<None Include="wwwroot\lib\bootstrap-icons\icons\clipboard2-pulse.svg" />
|
<None Include="wwwroot\lib\bootstrap-icons\icons\clipboard2-pulse.svg" />
|
||||||
<None Include="wwwroot\lib\bootstrap-icons\icons\clipboard2-x-fill.svg" />
|
<None Include="wwwroot\lib\bootstrap-icons\icons\clipboard2-x-fill.svg" />
|
||||||
<None Include="wwwroot\lib\bootstrap-icons\icons\clipboard2-x.svg" />
|
<None Include="wwwroot\lib\bootstrap-icons\icons\clipboard2-x.svg" />
|
||||||
<None Include="wwwroot\lib\bootstrap-icons\icons\clipboard2.svg" />
|
|
||||||
<None Include="wwwroot\lib\bootstrap-icons\icons\clock-fill.svg" />
|
<None Include="wwwroot\lib\bootstrap-icons\icons\clock-fill.svg" />
|
||||||
<None Include="wwwroot\lib\bootstrap-icons\icons\clock-history.svg" />
|
<None Include="wwwroot\lib\bootstrap-icons\icons\clock-history.svg" />
|
||||||
<None Include="wwwroot\lib\bootstrap-icons\icons\clock.svg" />
|
<None Include="wwwroot\lib\bootstrap-icons\icons\clock.svg" />
|
||||||
@@ -2093,6 +2092,31 @@
|
|||||||
<None Include="wwwroot\lib\bootstrap-icons\icons\zoom-out.svg" />
|
<None Include="wwwroot\lib\bootstrap-icons\icons\zoom-out.svg" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
|
||||||
|
<PackageReference Include="BuildBundlerMinifier2022" Version="2.9.11" />
|
||||||
|
<PackageReference Include="DigitalData.Core.API" Version="2.2.1" />
|
||||||
|
<PackageReference Include="DigitalData.Core.Exceptions" Version="1.1.0" />
|
||||||
|
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="3.1.1" />
|
||||||
|
<PackageReference Include="HtmlSanitizer" Version="9.0.892" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.20" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Caching.SqlServer" Version="7.0.20" />
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
|
<PackageReference Include="NLog" Version="5.2.8" />
|
||||||
|
<PackageReference Include="NLog.Web.AspNetCore" Version="5.3.4" />
|
||||||
|
<PackageReference Include="Quartz" Version="3.7.0" />
|
||||||
|
<PackageReference Include="Quartz.AspNetCore" Version="3.7.0" />
|
||||||
|
<PackageReference Include="Quartz.Plugins" Version="3.7.0" />
|
||||||
|
<PackageReference Include="Quartz.Serialization.Json" Version="3.7.0" />
|
||||||
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||||
|
<PackageReference Include="System.Configuration.ConfigurationManager" Version="7.0.0" />
|
||||||
|
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="7.0.0" />
|
||||||
|
<PackageReference Include="System.DirectoryServices" Version="7.0.1" />
|
||||||
|
<PackageReference Include="System.DirectoryServices.AccountManagement" Version="7.0.1" />
|
||||||
|
<PackageReference Include="System.DirectoryServices.Protocols" Version="7.0.1" />
|
||||||
|
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
|
||||||
|
<PackageReference Include="System.Security.Cryptography.Cng" Version="5.0.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||||
<PackageReference Include="BuildBundlerMinifier2022" Version="2.9.9" />
|
<PackageReference Include="BuildBundlerMinifier2022" Version="2.9.9" />
|
||||||
<PackageReference Include="DigitalData.Core.API" Version="2.2.1" />
|
<PackageReference Include="DigitalData.Core.API" Version="2.2.1" />
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"UseDbMigration": false,
|
"UseDbMigration": false,
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"Default": "Server=SDD-VMP04-SQL17\\DD_DEVELOP01;Database=DD_ECM;User Id=sa;Password=dd;Encrypt=false;TrustServerCertificate=True;",
|
"Default": "Server=10.1.6.7;Database=DD_ECM;User Id=DD_ECM;Password=dd_ecm;Encrypt=false;TrustServerCertificate=True;",
|
||||||
"DbMigrationTest": "Server=SDD-VMP04-SQL17\\DD_DEVELOP01;Database=DD_ECM_DATA_MIGR_TEST;User Id=sa;Password=dd;Encrypt=false;TrustServerCertificate=True;"
|
"DbMigrationTest": "Server=SDD-VMP04-SQL17\\DD_DEVELOP01;Database=DD_ECM_DATA_MIGR_TEST;User Id=sa;Password=dd;Encrypt=false;TrustServerCertificate=True;"
|
||||||
},
|
},
|
||||||
"DbTriggerParams": {
|
"DbTriggerParams": {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
"NLog": {
|
"NLog": {
|
||||||
"throwConfigExceptions": true,
|
"throwConfigExceptions": true,
|
||||||
"variables": {
|
"variables": {
|
||||||
"logDirectory": "E:\\LogFiles\\Digital Data\\signFlow",
|
"logDirectory": "F:\\LogFiles\\signFLOW",
|
||||||
"logFileNamePrefix": "${shortdate}-ECM.EnvelopeGenerator.Web"
|
"logFileNamePrefix": "${shortdate}-ECM.EnvelopeGenerator.Web"
|
||||||
},
|
},
|
||||||
"targets": {
|
"targets": {
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"PSPDFKitLicenseKey": "SXCtGGY9XA-31OGUXQK-r7c6AkdLGPm2ljuyDr1qu0kkhLvydg-Do-fxpNUF4Rq3fS_xAnZRNFRHbXpE6sQ2BMcCSVTcXVJO6tPviexjpiT-HnrDEySlUERJnnvh-tmeOWprxS6BySPnSILkmaVQtUfOIUS-cUbvvEYHTvQBKbSF8di4XHQFyfv49ihr51axm3NVV3AXwh2EiKL5C5XdqBZ4sQ4O7vXBjM2zvxdPxlxdcNYmiU83uAzw7B83O_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OMhkpQkg6nNctL24APZX47ZKqbHfkU=",
|
||||||
}
|
}
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
"media-src 'self'",
|
"media-src 'self'",
|
||||||
"object-src 'self'"
|
"object-src 'self'"
|
||||||
],
|
],
|
||||||
"AllowedOrigins": [ "https://localhost:7202", "https://digitale.unterschrift.wisag.de/" ],
|
"AllowedOrigins": [ "http://localhost:8080", "https://digitale.unterschrift.wisag.de/" ],
|
||||||
"TFARegParams": {
|
"TFARegParams": {
|
||||||
"TimeLimit": "90.00:00:00"
|
"TimeLimit": "90.00:00:00"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,10 +114,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Company": {
|
"Company": {
|
||||||
"Src": "/img/digital_data.svg",
|
"Src": "/img/wisag.svg",
|
||||||
"Classes": {
|
"Classes": {
|
||||||
"Show": "dd-show-logo",
|
"Show": "wisag-show-logo",
|
||||||
"Locked": "dd-locked-logo"
|
"Locked": "wisag-locked-logo"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user