backend + web: Protect Swagger UI behind admin login
This commit is contained in:
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">
|
||||
|
||||
Reference in new issue
Block a user