#19389: Publish draft link is displayed with authorization

Work Item: 19389

--HG--
branch : 1.x
This commit is contained in:
Zoltán Lehóczky
2013-05-18 13:12:03 +02:00
parent 0dc3fda7ff
commit caeb25ac43

View File

@@ -11,10 +11,10 @@
@T(" | ")
if (contentPart.HasDraft()) {
@Html.Link(T("Publish Draft").Text, Url.Action("Publish", "Admin", new { area = "Contents", id = contentPart.ContentItem.Id, returnUrl = Request.ToUrlString() }), new { itemprop = "UnsafeUrl" })
@T(" | ")
if (Authorizer.Authorize(Permissions.PublishContent, contentPart)) {
@Html.Link(T("Publish Draft").Text, Url.Action("Publish", "Admin", new { area = "Contents", id = contentPart.ContentItem.Id, returnUrl = Request.ToUrlString() }), new { itemprop = "UnsafeUrl" })
@T(" | ")
@Html.ActionLink(T("Preview").Text, "Preview", "Item", new {area = "Contents", id = ((ContentItem) Model.ContentPart.ContentItem).Id}, new {})
@T(" | ")
}