Patch account suspended page display issues (#777)

Remove excess heading and fix incorrect mod case display
This commit is contained in:
koko 2023-05-31 14:40:58 -04:00 committed by GitHub
parent 5c9819cce6
commit b4efba7f14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -12,8 +12,6 @@
}
<div class="ui middle aligned left aligned">
<h1>@Model.Translate(ModerationStrings.SuspensionHeading)</h1>
<p>
@Model.Translate(ModerationStrings.SuspensionExplanation, ServerConfiguration.Instance.Customization.ServerName)
</p>

View file

@ -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("~/");