diff options
Diffstat (limited to 'src/Pages/App/Users.cshtml.cs')
| -rw-r--r-- | src/Pages/App/Users.cshtml.cs | 14 |
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 |
