Introduce AuthScopedFilter to automatically set the AddedWho property on IAuthScoped commands using configuration, and register it globally for all controllers. Remove manual AddedWho assignment from ResultViewController. Make AddedWho nullable in AuthScope and IAuthScoped.
13 lines
259 B
C#
13 lines
259 B
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace ReC.Application.Common.Interfaces;
|
|
|
|
public record AuthScope
|
|
{
|
|
public string? AddedWho { get; set; }
|
|
}
|
|
|
|
public interface IAuthScoped : IScoped<AuthScope>
|
|
{
|
|
public string? AddedWho => Scope.AddedWho;
|
|
} |