< Summary - Heimdall API

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

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_From()100%11100%
get_To()100%11100%
get_ActorId()100%11100%
get_Action()100%11100%
get_TargetId()100%11100%
get_Succeeded()100%11100%
get_ActingPersonId()100%11100%
get_ActingRole()100%11100%

File(s)

/home/runner/work/heimdall-api/heimdall-api/src/Application/ArturRios.Heimdall.Query/Input/ListAuditLogQuery.cs

#LineLine coverage
 1using System.Text.Json.Serialization;
 2using ArturRios.Heimdall.Shared.Security;
 3using ArturRios.Mediator.Query;
 4
 5namespace ArturRios.Heimdall.Query.Input;
 6
 7/// <summary>
 8///     Request to list the audit trail (UC-48, FR-AT-01), newest first. Every filter is optional, and
 9///     those given combine with AND. <see cref="ActingPersonId" />/<see cref="ActingRole" /> are set by
 10///     the controller from the authenticated caller and are never bound from the request.
 11/// </summary>
 12/// <remarks>
 13///     There is no scope filter, and cannot be one: <c>AUDIT_LOG</c> has no scope column, and an old
 14///     row's target may since have been deleted or anonymised, so it cannot be attributed to a scope
 15///     reliably. That is why the listing is System Admins' only.
 16/// </remarks>
 17public class ListAuditLogQuery : BaseQuery, IActorScoped
 18{
 19    /// <summary>Earliest recording instant to include (UTC, inclusive).</summary>
 5520    public DateTime? From { get; set; }
 21
 22    /// <summary>Latest recording instant to include (UTC, inclusive). Must not be earlier than <see cref="From" />.</su
 8023    public DateTime? To { get; set; }
 24
 25    /// <summary>
 26    ///     The actor's public id. An entry whose actor has been cleared (NFR-21) names nobody, so this
 27    ///     filter cannot find it.
 28    /// </summary>
 4029    public Guid? ActorId { get; set; }
 30
 31    /// <summary>
 32    ///     The exact action, as recorded — the command's type name, e.g. <c>CreateScopeCommand</c>.
 33    ///     Matched case-sensitively; empty or whitespace means no filter.
 34    /// </summary>
 9635    public string? Action { get; set; }
 36
 37    /// <summary>
 38    ///     The affected entity's public id. An entry whose person target has been cleared (NFR-21)
 39    ///     names nobody, so this filter cannot find it.
 40    /// </summary>
 5141    public Guid? TargetId { get; set; }
 42
 43    /// <summary><c>true</c> for completed writes, <c>false</c> for refused ones.</summary>
 4044    public bool? Succeeded { get; set; }
 45
 46    [JsonIgnore]
 4147    public Guid ActingPersonId { get; set; }
 48
 49    [JsonIgnore]
 4150    public int ActingRole { get; set; }
 51}