Skip to content

Commit

Permalink
Show dashboard link only for authorized users.
Browse files Browse the repository at this point in the history
  • Loading branch information
TFleury committed Mar 15, 2019
1 parent 26622f4 commit a7c70bd
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user fa-fw"></i> @User.Identity.Name<b class="caret"></b></a>
<div class="dropdown-menu">
<a class="dropdown-item" asp-route-area="OrchardCore.Admin" asp-controller="Admin" asp-action="Index"><i class="fa fa-desktop fa-fw"></i> @T["Dashboard"]</a>
@if (User.HasClaim("Permission", "AccessAdminPanel"))
{
<a class="dropdown-item" asp-route-area="OrchardCore.Admin" asp-controller="Admin" asp-action="Index"><i class="fa fa-desktop fa-fw"></i> @T["Dashboard"]</a>
}
<a class="dropdown-item" asp-route-area="OrchardCore.Users" asp-controller="Account" asp-action="ChangePassword"><i class="fa fa-lock fa-fw"></i> @T["Change Password"]</a>
@if (hasExternalProviders)
{
Expand Down

0 comments on commit a7c70bd

Please sign in to comment.