From 48921106502f837aa3e3c40667393056e4253b59 Mon Sep 17 00:00:00 2001 From: jvyden Date: Fri, 12 Aug 2022 21:42:37 -0400 Subject: [PATCH] Fix incorrect logic when determining if a user can view a hidden level --- ProjectLighthouse.Servers.Website/Pages/SlotPage.cshtml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProjectLighthouse.Servers.Website/Pages/SlotPage.cshtml.cs b/ProjectLighthouse.Servers.Website/Pages/SlotPage.cshtml.cs index aaf2e502..3947492d 100644 --- a/ProjectLighthouse.Servers.Website/Pages/SlotPage.cshtml.cs +++ b/ProjectLighthouse.Servers.Website/Pages/SlotPage.cshtml.cs @@ -54,7 +54,7 @@ public class SlotPage : BaseLayout } } - if (slot.Hidden || slot.SubLevel && this.User == null && this.User != slot.Creator || !this.User!.IsModerator) + if (slot.Hidden || slot.SubLevel && (this.User == null && this.User != slot.Creator || !(this.User?.IsModerator ?? false))) return this.NotFound(); this.Slot = slot;