< Summary - Heimdall API

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

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Name()100%11100%
get_Email()100%11100%
get_ExcludeOwnersOfScopeId()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/ListScopeAdminsQuery.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 administrators who may own a scope — every <c>ScopeAdmin</c>, and for a
 9///     System Admin caller every <c>SystemAdmin</c> too — with pagination and optional filtering
 10///     (UC-07 read d, FR-PE-12). This is what backs an owner picker: UI-11 selects a scope's first
 11///     owners before the scope exists, and UI-14 adds an existing Scope Admin as a co-owner.
 12///     <see cref="ActingPersonId" />/<see cref="ActingRole" /> are set by the controller from the
 13///     authenticated caller and are never taken from the request; both are <c>[JsonIgnore]</c>,
 14///     which <c>ServerPopulatedBindingMetadataProvider</c> turns into "not bindable", so they never
 15///     reach the public contract.
 16/// </summary>
 17/// <remarks>
 18///     There is deliberately no <c>IncludeDeleted</c>. A logically deleted administrator is never a
 19///     valid owner — <c>PersonNotValidScopeAdmin</c> refuses one — so listing them could only offer
 20///     a picker entry whose submission is guaranteed to fail.
 21/// </remarks>
 22public class ListScopeAdminsQuery : BaseQuery, IActorScoped
 23{
 24    /// <summary>Optional case-insensitive substring filter on the administrator's name.</summary>
 5025    public string? Name { get; set; }
 26
 27    /// <summary>Optional case-insensitive substring filter on the administrator's email.</summary>
 4228    public string? Email { get; set; }
 29
 30    /// <summary>
 31    ///     When set, the current owners of this scope are removed from the results (UI-14 AF-14c).
 32    ///     The exclusion runs before pagination, so a page is not silently short. The caller must be
 33    ///     entitled to manage the named scope: without that check, running the query with and
 34    ///     without this parameter and diffing the two results would enumerate the owners of any
 35    ///     scope, which is exactly what this endpoint's minimal projection exists to prevent.
 36    /// </summary>
 4537    public Guid? ExcludeOwnersOfScopeId { get; set; }
 38
 39    [JsonIgnore]
 2740    public Guid ActingPersonId { get; set; }
 41
 42    [JsonIgnore]
 4443    public int ActingRole { get; set; }
 44}