Switch to policy-based authorization for controllers

Replaced role-based [Authorize] attributes with policy-based ones in AuthController and TfaRegistrationController. This centralizes authorization logic and allows for more flexible access control.
This commit is contained in:
2026-02-03 15:16:30 +01:00
parent 2b8edc697a
commit 8742ea6025
2 changed files with 3 additions and 3 deletions

View File

@@ -111,7 +111,7 @@ public class TfaRegistrationController : ControllerBase
/// <summary>
/// Logs out the envelope receiver from cookie authentication.
/// </summary>
[Authorize(Roles = Role.FullyAuth)]
[Authorize(Policy = AuthorizationPolicies.ReceiverFullyAuth)]
[HttpPost("auth/logout")]
public async Task<IActionResult> LogOutAsync()
{