Add AuthScopedFilter to set AddedWho via middleware
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.
This commit is contained in:
@@ -4,10 +4,10 @@ namespace ReC.Application.Common.Interfaces;
|
||||
|
||||
public record AuthScope
|
||||
{
|
||||
public string AddedWho { get; set; } = null!;
|
||||
public string? AddedWho { get; set; }
|
||||
}
|
||||
|
||||
public interface IAuthScoped : IScoped<AuthScope>
|
||||
{
|
||||
public string AddedWho => Scope.AddedWho;
|
||||
public string? AddedWho => Scope.AddedWho;
|
||||
}
|
||||
Reference in New Issue
Block a user