small roles update
All checks were successful
Build and Deploy API / build-and-deploy (push) Successful in 10s

This commit is contained in:
2026-03-25 23:11:39 -05:00
parent eeee94d0d6
commit 12d1e65ed5
2 changed files with 14 additions and 3 deletions

View File

@@ -20,13 +20,13 @@ public class UsersController : ControllerBase {
service_ = service;
}
[Authorize(Roles = "Admin, Superuser")]
[Authorize(Policy = "RequireAdmin")]
[HttpGet]
public async Task<ActionResult<List<User>>> getUsers() {
return Ok(await service_.GetAll());
}
[Authorize(Roles = "Admin, Superuser")]
[Authorize(Policy = "RequireAdmin")]
[HttpGet("{id:int}")]
public async Task<ActionResult<User>> getUser(int id) {
@@ -37,7 +37,7 @@ public class UsersController : ControllerBase {
return Ok(user);
}
[Authorize(Roles = "Superuser")]
[Authorize(Policy = "RequireSuperuser")]
[HttpDelete("{id}")]
public async Task<ActionResult> deleteUser(int id) {