From b4efba7f1475d0301af55f20582af971b05c3891 Mon Sep 17 00:00:00 2001 From: koko Date: Wed, 31 May 2023 14:40:58 -0400 Subject: [PATCH] Patch account suspended page display issues (#777) Remove excess heading and fix incorrect mod case display --- .../Pages/Login/BannedUserPage.cshtml | 2 -- .../Pages/Login/BannedUserPage.cshtml.cs | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ProjectLighthouse.Servers.Website/Pages/Login/BannedUserPage.cshtml b/ProjectLighthouse.Servers.Website/Pages/Login/BannedUserPage.cshtml index 4924e5f1..881d00e6 100644 --- a/ProjectLighthouse.Servers.Website/Pages/Login/BannedUserPage.cshtml +++ b/ProjectLighthouse.Servers.Website/Pages/Login/BannedUserPage.cshtml @@ -12,8 +12,6 @@ }
-

@Model.Translate(ModerationStrings.SuspensionHeading)

-

@Model.Translate(ModerationStrings.SuspensionExplanation, ServerConfiguration.Instance.Customization.ServerName)

diff --git a/ProjectLighthouse.Servers.Website/Pages/Login/BannedUserPage.cshtml.cs b/ProjectLighthouse.Servers.Website/Pages/Login/BannedUserPage.cshtml.cs index b7cc2ea7..ae0e2e88 100644 --- a/ProjectLighthouse.Servers.Website/Pages/Login/BannedUserPage.cshtml.cs +++ b/ProjectLighthouse.Servers.Website/Pages/Login/BannedUserPage.cshtml.cs @@ -25,7 +25,9 @@ public class BannedUserPage : BaseLayout if (!user.IsBanned) return this.Redirect("~/"); ModerationCaseEntity? modCase = await this.Database.Cases - .FirstOrDefaultAsync(c => c.AffectedId == user.UserId && c.Type == CaseType.UserBan); + .LastOrDefaultAsync(c => c.AffectedId == user.UserId + && c.Type == CaseType.UserBan + && !c.Dismissed); if (modCase == null) return this.Redirect("~/");