From 214f1601b52a661f8dbd489e1a0d61ef6a824eb6 Mon Sep 17 00:00:00 2001 From: Blitblank Date: Sat, 28 Mar 2026 00:54:03 -0500 Subject: [PATCH] comment --- api/Program.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/Program.cs b/api/Program.cs index c74de6b..6e4f8b7 100644 --- a/api/Program.cs +++ b/api/Program.cs @@ -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 => { options.AddPolicy("RequireAdmin", policy => { policy.RequireRole("Admin", "Superuser");