summaryrefslogtreecommitdiffstats
path: root/src/Pages/App/Users.cshtml.cs
blob: e7a1ceb2a0fa25a9eafd765237839a9ac6d2e1de (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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();
        }
    }
}