-
Welcome
-
Learn about building Web apps with ASP.NET Core.
+
Maintenance Pages
+
Use this site to render outage and maintenance messages.
+
+ @if (Model.IsAdmin)
+ {
+
Go to edit templates
+ }
diff --git a/Pages/Index.cshtml.cs b/Pages/Index.cshtml.cs
index 2eebb53..91d8293 100644
--- a/Pages/Index.cshtml.cs
+++ b/Pages/Index.cshtml.cs
@@ -1,5 +1,6 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
+using maintenance.Authentication.Core;
namespace maintenance.Pages;
@@ -12,9 +13,11 @@ public class IndexModel : PageModel
_logger = logger;
}
+ public bool IsAdmin { get; private set; }
+
public void OnGet()
{
-
+ IsAdmin = User.IsInRole(AuthRoles.Admin);
}
}
diff --git a/Pages/Shared/_Layout.cshtml b/Pages/Shared/_Layout.cshtml
index 22d9966..bcc1117 100644
--- a/Pages/Shared/_Layout.cshtml
+++ b/Pages/Shared/_Layout.cshtml
@@ -9,27 +9,6 @@