backend + web: Protect Swagger UI behind admin login

This commit is contained in:
GonnaHetzMe committed 2026-12-03 00:49:36 +01:00
1 parent d8de714481
commit eddf5837eb
16 files changed
+158 -28

No files matched your search

@@ -9,6 +9,10 @@
<ul class="dropdown-menu dropdown-menu-end">
<li><span class="dropdown-item-text small text-body-secondary">@User.FindFirst(ClaimTypes.Email)?.Value</span></li>
<li><a class="dropdown-item" asp-controller="Profile" asp-action="Index">Můj profil</a></li>
@if (User.IsInRole(UserRoles.Admin))
{
<li><a class="dropdown-item" href="~/swagger">Swagger API</a></li>
}
<li><hr class="dropdown-divider" /></li>
<li>
<form method="post" asp-controller="Account" asp-action="Logout">