diff --git a/OliverBooth/Pages/Shared/_AdminLayout.cshtml b/OliverBooth/Pages/Shared/_AdminLayout.cshtml index 10fda4d..635cf59 100644 --- a/OliverBooth/Pages/Shared/_AdminLayout.cshtml +++ b/OliverBooth/Pages/Shared/_AdminLayout.cshtml @@ -1,4 +1,3 @@ -@using System.Diagnostics @using OliverBooth.Data.Blog @using OliverBooth.Data.Web @using OliverBooth.Services @@ -17,7 +16,6 @@ { UserService.TryGetUser(session.UserId, out user); } - Debug.Assert(user is not null); } @@ -98,7 +96,7 @@ Blog Posts - @if (user.HasPermission("projects:read")) + @if (user?.HasPermission("projects:read") != true) {
  • @@ -106,7 +104,7 @@
  • } - @if (user.HasPermission("users:read")) + @if (user?.HasPermission("users:read") != true) {
  • @@ -118,8 +116,8 @@