< Summary - Heimdall API

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

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Id()100%11100%
get_Name()100%11100%
get_Email()100%11100%
get_Role()100%11100%
get_EmailVerified()100%11100%
get_TwoFactorEnabled()100%11100%
get_IsDeleted()100%11100%
get_ScopeId()100%11100%
get_OwnedScopeIds()100%11100%
get_CreatedAt()100%11100%
get_UpdatedAt()100%11100%

File(s)

/home/runner/work/heimdall-api/heimdall-api/src/Application/ArturRios.Heimdall.Query/Output/PersonOutput.cs

#LineLine coverage
 1using ArturRios.Mediator.Query;
 2
 3namespace ArturRios.Heimdall.Query.Output;
 4
 5/// <summary>
 6///     Person data returned by the UC-07 view/list queries. Only externally-facing <c>PublicId</c>
 7///     identifiers are exposed, and there is deliberately no field for <c>PasswordHash</c> or
 8///     <c>Salt</c>, so neither can escape through a projection.
 9/// </summary>
 10public class PersonOutput : QueryOutput
 11{
 12    /// <summary>Public identifier of the person.</summary>
 143113    public Guid Id { get; set; }
 14
 15    /// <summary>Full name.</summary>
 231816    public string Name { get; set; } = string.Empty;
 17
 18    /// <summary>Email address.</summary>
 229319    public string Email { get; set; } = string.Empty;
 20
 21    /// <summary>Assigned role value (see <c>Roles</c>).</summary>
 136622    public int Role { get; set; }
 23
 24    /// <summary>Whether the person's email has been verified.</summary>
 136425    public bool EmailVerified { get; set; }
 26
 27    /// <summary>
 28    ///     Whether the person has an active two-factor authentication configuration (FR-2F-15). The
 29    ///     configured methods are deliberately not published here — an administrator reading a
 30    ///     listing learns whether an account is protected, which is what makes coverage visible,
 31    ///     but not how, which would otherwise map out which accounts fall back to email.
 32    ///     <c>GET /api/auth/2fa</c> is where a person reads the detail, and only for themselves.
 33    /// </summary>
 137534    public bool TwoFactorEnabled { get; set; }
 35
 36    /// <summary>Whether the person is logically deleted.</summary>
 136637    public bool IsDeleted { get; set; }
 38
 39    /// <summary>Public identifier of the scope the person belongs to as a User; <c>null</c> otherwise.</summary>
 136740    public Guid? ScopeId { get; set; }
 41
 42    /// <summary>
 43    ///     Public identifiers of the scopes the person owns, as far as the reader may see them
 44    ///     (FR-PE-19): every one for a System Admin and for the person themselves, and for a Scope
 45    ///     Admin reading somebody else only those the Scope Admin owns too. Empty for non-owners.
 46    /// </summary>
 230447    public IEnumerable<Guid> OwnedScopeIds { get; set; } = new List<Guid>();
 48
 49    /// <summary>Creation timestamp.</summary>
 136450    public DateTime CreatedAt { get; set; }
 51
 52    /// <summary>Last update timestamp.</summary>
 136453    public DateTime UpdatedAt { get; set; }
 54}