summaryrefslogtreecommitdiffstats
path: root/src/Pages/App/Users.cshtml.cs
diff options
context:
space:
mode:
authorivar <i@oiee.no>2025-10-19 23:41:23 +0200
committerivar <i@oiee.no>2025-10-19 23:41:23 +0200
commit3f4c0720e1e3421431e7baa20882a4a4512a7fab (patch)
tree734ca81d7d0841d8863e3f523ebba14c282dc681 /src/Pages/App/Users.cshtml.cs
downloadfagprove-3f4c0720e1e3421431e7baa20882a4a4512a7fab.tar.xz
fagprove-3f4c0720e1e3421431e7baa20882a4a4512a7fab.zip
InitialHEADmaster
Diffstat (limited to 'src/Pages/App/Users.cshtml.cs')
-rw-r--r--src/Pages/App/Users.cshtml.cs14
1 files changed, 14 insertions, 0 deletions
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