From 260d0b8ec80671234df91872e8315c7fd7e3bb9d Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Thu, 20 Jun 2019 15:41:44 +0300 Subject: [PATCH] Update Detail.cshtml --- .../src/Volo.Blogging.Web/Pages/Blog/Posts/Detail.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Detail.cshtml b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Detail.cshtml index f604ef40a7..1ee70385ff 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Detail.cshtml +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Detail.cshtml @@ -74,7 +74,7 @@ @L["Edit"] } - @if (await Authorization.IsGrantedAsync(BloggingPermissions.Posts.Delete) || (CurrentUser.Id == Model.Post.CreatorId)) + @if (await Authorization.IsGrantedAsync(BloggingPermissions.Posts.Delete) || (CurrentUser.Id.HasValue && CurrentUser.Id == Model.Post.CreatorId)) { |