From 3f4c0720e1e3421431e7baa20882a4a4512a7fab Mon Sep 17 00:00:00 2001 From: ivar Date: Sun, 19 Oct 2025 23:41:23 +0200 Subject: Initial --- src/Pages/App/Users.cshtml.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/Pages/App/Users.cshtml.cs (limited to 'src/Pages/App/Users.cshtml.cs') diff --git a/src/Pages/App/Users.cshtml.cs b/src/Pages/App/Users.cshtml.cs new file mode 100644 index 0000000..e7a1ceb --- /dev/null +++ b/src/Pages/App/Users.cshtml.cs @@ -0,0 +1,14 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace IOL.Fagprove.Pages.App +{ + public class Users : PageModel + { + public ActionResult OnGet() + { + if (!User.IsInRole("Administrator")) return Redirect("/app"); + return Page(); + } + } +} \ No newline at end of file -- cgit v1.3