From cd74de69c42599f027507bfac716c18f236b98da Mon Sep 17 00:00:00 2001
From: Engincan VESKE <43685404+EngincanV@users.noreply.github.com>
Date: Mon, 5 Jun 2023 09:32:29 +0300
Subject: [PATCH] Refactor #16746
---
.../Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml | 8 +++++---
.../Pages/Blogs/Posts/Detail.cshtml.cs | 10 +++-------
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml
index d2746284ba..cc37c15c89 100644
--- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml
+++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml
@@ -169,7 +169,8 @@
}
}
- @if (CurrentUser.UserName == Model.Post.Writer?.UserName)
+
+ @if (CurrentUser.Id.HasValue && CurrentUser.Id.Value == Model.Post.Writer?.Id)
{
@L["EditProfile"]
}
@@ -197,10 +198,11 @@
+