Template
mirror of
https://github.com/egmont11/ASP.Net-Core-MVC-Template.git
synced 2026-07-24 07:09:56 +02:00
Fixed up the database connection, added admin account and admin area
This commit is contained in:
@@ -30,6 +30,12 @@
|
||||
<ul class="navbar-nav">
|
||||
@if (User.Identity?.IsAuthenticated == true)
|
||||
{
|
||||
@if (User.IsInRole("Admin"))
|
||||
{
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-primary fw-bold" asp-area="Admin" asp-controller="Dashboard" asp-action="Index">Admin Panel</a>
|
||||
</li>
|
||||
}
|
||||
<li class="nav-item">
|
||||
<span class="nav-link text-dark">Hello, @User.Identity.Name!</span>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user