Put auth on account index page to force login
This commit is contained in:
parent
23a51bf18d
commit
ab8745a418
1 changed files with 2 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Authentication;
|
using Microsoft.AspNetCore.Authentication;
|
||||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Website.Data;
|
using Website.Data;
|
||||||
using Website.Models;
|
using Website.Models;
|
||||||
|
@ -13,6 +14,7 @@ namespace Website.Controllers {
|
||||||
|
|
||||||
public AccountController(UserRepository repo) => _repo = repo;
|
public AccountController(UserRepository repo) => _repo = repo;
|
||||||
|
|
||||||
|
[Authorize]
|
||||||
public IActionResult Index() => View();
|
public IActionResult Index() => View();
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue