feat(secrets): mount /admin/secrets + AddSecretsAuthorization in the dashboard (G-6)

This commit is contained in:
Joseph Doherty
2026-07-16 11:02:11 -04:00
parent b79e119ada
commit 22a878c36e
5 changed files with 97 additions and 1 deletions
@@ -19,6 +19,7 @@
</NavRailSection>
<NavRailSection Title="Admin" Key="admin">
<NavRailItem Href="/apikeys" Text="API Keys" />
<NavRailItem Href="/admin/secrets" Text="Secrets" />
<NavRailItem Href="/settings" Text="Settings" />
</NavRailSection>
</Nav>
@@ -1,4 +1,5 @@
<Router AppAssembly="@typeof(Routes).Assembly">
<Router AppAssembly="@typeof(Routes).Assembly"
AdditionalAssemblies="new[]{ typeof(ZB.MOM.WW.Secrets.Ui.SecretsPage).Assembly }">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
@@ -132,6 +132,7 @@ public static class DashboardEndpointRouteBuilderExtensions
// cookie scheme and redirected to /login.
endpoints.MapRazorComponents<App>()
.AddInteractiveServerRenderMode()
.AddAdditionalAssemblies(typeof(ZB.MOM.WW.Secrets.Ui.SecretsPage).Assembly)
.RequireAuthorization(DashboardAuthenticationDefaults.ViewerPolicy);
return endpoints;