Implement US-14 assigned professional read access

This commit is contained in:
Steffen committed 2026-10-05 11:40:34 +02:00
1 parent 0ce9b2b168
commit 5996481081
11 files changed
+441 -24

No files matched your search

@@ -0,0 +1,17 @@
using System.Security.Claims;
using ApiGateway.Security;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace ApiGateway.Controllers;
[ApiController]
[Authorize(Policy = "HealthcareProfessional")]
[Route("api/professionals/me/patients")]
public sealed class ProfessionalController(ProfessionalAssignments assignments) : ControllerBase
{
[HttpGet]
public IActionResult GetAssignedPatients() =>
Ok(assignments.GetPatients(User.FindFirstValue(ClaimTypes.NameIdentifier)!)
.Select(patientId => new { patientId }));
}