Browse Source

Merge pull request #25207 from abpframework/blogging-posts-permission

Require delete permission for blog posts
pull/25208/head
Yağmur Çelik 6 months ago
committed by GitHub
parent
commit
d47e1a0318
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml

2
modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml

@ -95,7 +95,7 @@
<i class="fa fa-pencil"></i> @L["Edit"]
</a>
}
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Posts.Delete) || (CurrentUser.Id.HasValue && CurrentUser.Id == Model.Post.CreatorId))
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Posts.Delete))
{
<span class="seperator">|</span>
<a href="#" id="DeletePostLink" data-postid="@Model.Post.Id" data-blogShortName="@Model.BlogShortName">

Loading…
Cancel
Save