< Summary - Heimdall API

Information
Class: ArturRios.Heimdall.Command.Input.LiftProcessingRestrictionCommand
Assembly: ArturRios.Heimdall.Command
File(s): /home/runner/work/heimdall-api/heimdall-api/src/Application/ArturRios.Heimdall.Command/Input/LiftProcessingRestrictionCommand.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 43
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
100%
Covered methods: 4
Fully covered methods: 4
Total methods: 4
Method coverage: 100%
Full method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_SubjectId()100%11100%
get_ActingPersonId()100%11100%
get_ActingRole()100%11100%
get_ActingSubjectRightsOnly()100%11100%

File(s)

/home/runner/work/heimdall-api/heimdall-api/src/Application/ArturRios.Heimdall.Command/Input/LiftProcessingRestrictionCommand.cs

#LineLine coverage
 1using System.Text.Json.Serialization;
 2using ArturRios.Heimdall.Shared.Security;
 3using ArturRios.Mediator.Command;
 4
 5namespace ArturRios.Heimdall.Command.Input;
 6
 7/// <summary>
 8///     Lifts a restriction on processing (UC-45, GDPR Art. 18(3)).
 9/// </summary>
 10/// <remarks>
 11///     <para>
 12///         Two callers, and the difference matters. A <b>System Admin</b> lifting somebody else's
 13///         restriction must inform them first — Art. 18(3) makes that a precondition, not a courtesy
 14///         afterwards. A <b>subject</b> lifting their own needs no notification: they are the person
 15///         who would be notified.
 16///     </para>
 17///     <para>
 18///         <see cref="SubjectId" /> is therefore optional. Absent, the caller is lifting their own;
 19///         present, they are acting on somebody else's and the role requirement applies.
 20///     </para>
 21/// </remarks>
 22public class LiftProcessingRestrictionCommand : BaseCommand, IActorScoped
 23{
 24    /// <summary>
 25    ///     The identity whose restriction is being lifted, or <c>null</c> to lift the caller's own.
 26    /// </summary>
 2527    public Guid? SubjectId { get; set; }
 28
 29    [JsonIgnore]
 4130    public Guid ActingPersonId { get; set; }
 31
 32    [JsonIgnore]
 2533    public int ActingRole { get; set; }
 34
 35    /// <summary>
 36    ///     Whether the caller's token is subject-rights-only (NFR-24) — issued to a restricted
 37    ///     identity at sign-in. Such a token acts for its subject alone, so it never lifts anybody
 38    ///     else's restriction, whatever role it claims and even once its own restriction is gone.
 39    ///     Taken from the token, never from the request.
 40    /// </summary>
 41    [JsonIgnore]
 1642    public bool ActingSubjectRightsOnly { get; set; }
 43}