comment
All checks were successful
Build and Deploy API / build-and-deploy (push) Successful in 9s

This commit is contained in:
2026-03-28 00:54:03 -05:00
parent 0af0ddf6b9
commit 214f1601b5

View File

@@ -46,6 +46,9 @@ builder.Services.AddAuthentication(options => {
}; };
}); });
// TODO: adding roles doesnt work atm because roles need to be seeded in the database first
// maybe programamatically checking them at startup like if(roleManager_.FindAsync("Admin") == null { roleManager_.addAsync("Admin"); })
// or something
builder.Services.AddAuthorization(options => { builder.Services.AddAuthorization(options => {
options.AddPolicy("RequireAdmin", policy => { options.AddPolicy("RequireAdmin", policy => {
policy.RequireRole("Admin", "Superuser"); policy.RequireRole("Admin", "Superuser");