feat(api): PUT /api/v1/users/{id}/permisos/overrides + excepciones domain + ExceptionFilter [UDT-009]

This commit is contained in:
2026-04-15 21:43:38 -03:00
parent 47323302cc
commit 7d4dc4d2bb
7 changed files with 179 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
namespace SIGCM2.Domain.Exceptions;
/// <summary>
/// UDT-009: Thrown when the same code appears in both grant and deny arrays.
/// Maps to 400 { title: "grant-deny-overlap", overlap: [...] }.
/// </summary>
public sealed class GrantDenyOverlapException : Exception
{
public IReadOnlyList<string> Overlap { get; }
public GrantDenyOverlapException(IReadOnlyList<string> overlap)
: base($"Los siguientes códigos aparecen en grant y deny simultáneamente: {string.Join(", ", overlap)}")
{
Overlap = overlap;
}
}