| | | 1 | | using ArturRios.Mediator.Query; |
| | | 2 | | |
| | | 3 | | namespace 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> |
| | | 10 | | public class PersonOutput : QueryOutput |
| | | 11 | | { |
| | | 12 | | /// <summary>Public identifier of the person.</summary> |
| | 1431 | 13 | | public Guid Id { get; set; } |
| | | 14 | | |
| | | 15 | | /// <summary>Full name.</summary> |
| | 2318 | 16 | | public string Name { get; set; } = string.Empty; |
| | | 17 | | |
| | | 18 | | /// <summary>Email address.</summary> |
| | 2293 | 19 | | public string Email { get; set; } = string.Empty; |
| | | 20 | | |
| | | 21 | | /// <summary>Assigned role value (see <c>Roles</c>).</summary> |
| | 1366 | 22 | | public int Role { get; set; } |
| | | 23 | | |
| | | 24 | | /// <summary>Whether the person's email has been verified.</summary> |
| | 1364 | 25 | | 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> |
| | 1375 | 34 | | public bool TwoFactorEnabled { get; set; } |
| | | 35 | | |
| | | 36 | | /// <summary>Whether the person is logically deleted.</summary> |
| | 1366 | 37 | | 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> |
| | 1367 | 40 | | 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> |
| | 2304 | 47 | | public IEnumerable<Guid> OwnedScopeIds { get; set; } = new List<Guid>(); |
| | | 48 | | |
| | | 49 | | /// <summary>Creation timestamp.</summary> |
| | 1364 | 50 | | public DateTime CreatedAt { get; set; } |
| | | 51 | | |
| | | 52 | | /// <summary>Last update timestamp.</summary> |
| | 1364 | 53 | | public DateTime UpdatedAt { get; set; } |
| | | 54 | | } |