Replaced direct role-based [Authorize] attributes with named authorization policies (e.g., AuthPolicy.Receiver, AuthPolicy.SenderOrReceiver) in AnnotationController, DocumentController, and ReadOnlyController. Added and registered new policies in Program.cs and updated AuthPolicy constants. This centralizes and simplifies authorization management.
13 lines
428 B
C#
13 lines
428 B
C#
namespace EnvelopeGenerator.Domain.Constants
|
|
{
|
|
public static class AuthPolicy
|
|
{
|
|
public const string SenderOrReceiver = nameof(SenderOrReceiver) + nameof(AuthPolicy);
|
|
|
|
public const string Sender = nameof(Sender) + nameof(AuthPolicy);
|
|
|
|
public const string Receiver = nameof(Receiver) + nameof(AuthPolicy);
|
|
|
|
public const string ReceiverTFA = nameof(ReceiverTFA) + nameof(AuthPolicy);
|
|
}
|
|
} |