fix(AnnotationController): enforce proper rejection and history checks in CreateOrUpdate

- Updated `AnyHistoryAsync` call to filter by `EnvelopeRejected` and `DocumentRejected` statuses, returning 403 instead of 200 when applicable.
- Ensures users cannot proceed if envelope was previously rejected.
- Minor cleanup in CreateOrUpdate logic to better handle authorization and signed checks.
This commit is contained in:
2025-11-14 13:49:58 +01:00
parent 99e3e4c24d
commit 773721b634
2 changed files with 3 additions and 4 deletions

View File

@@ -26,7 +26,7 @@ public static class CountHistoryQueryExtensions
/// <param name="statuses"></param>
/// <param name="cancel"></param>
/// <returns></returns>
public static async Task<bool> AnyHistoryAsync(this ISender sender, string uuid, IEnumerable<EnvelopeStatus> statuses, CancellationToken cancel)
public static async Task<bool> AnyHistoryAsync(this ISender sender, string uuid, IEnumerable<EnvelopeStatus> statuses, CancellationToken cancel = default)
{
var count = await sender.Send(new CountHistoryQuery
{