refactor(Controllers): FullyAuth-Rollenbedingung für jedes bestehende Auth-Attribut hinzugefügt, um die Autorisierung in Stufen aufzuteilen.

This commit is contained in:
Developer 02
2025-02-07 10:53:17 +01:00
parent 82d8521a25
commit 33fcb5b70e
4 changed files with 13 additions and 12 deletions

View File

@@ -4,6 +4,7 @@ using EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using static EnvelopeGenerator.Common.Constants;
namespace EnvelopeGenerator.Web.Controllers
{
@@ -28,7 +29,7 @@ namespace EnvelopeGenerator.Web.Controllers
}
[HttpPost]
[Authorize]
[Authorize(Roles = ReceiverRole.FullyAuth)]
public async Task<IActionResult> CreateAsync([FromBody] EnvelopeReceiverReadOnlyCreateDto createDto)
{
try