#18232: Hide dashboard link if not allowed

Work Item: 18232

--HG--
branch : 1.x
This commit is contained in:
piedone
2012-02-10 11:38:03 -08:00
parent 016f464fd3
commit a0a9933f6b

View File

@@ -7,7 +7,9 @@
</span>
<span class="user-actions">
@Html.ActionLink(T("Sign Out").ToString(), "LogOff", new { Controller = "Account", Area = "Orchard.Users", ReturnUrl = Context.Request.RawUrl }, new { rel = "nofollow" })
@Html.ActionLink(T("Dashboard").ToString(), "Index", new { Area = "Dashboard", Controller = "Admin" })
@if (AuthorizedFor(Orchard.Security.StandardPermissions.AccessAdminPanel)) {
@Html.ActionLink(T("Dashboard").ToString(), "Index", new {Area = "Dashboard", Controller = "Admin"})
}
</span>
} else {
<span class="user-actions">@Html.ActionLink(T("Sign In").ToString(), "LogOn", new { Controller = "Account", Area = "Orchard.Users", ReturnUrl = (Request.QueryString["ReturnUrl"] ?? Request.RawUrl) }, new { rel = "nofollow" })</span>