0
0

Authorize account methods

This commit is contained in:
Sergey Chebotar 2023-03-07 08:23:53 +03:00
parent 45af463dbe
commit 6b57030087

View File

@ -16,17 +16,22 @@ public class AccountController : Controller
SignInManager = signInManager; SignInManager = signInManager;
} }
[Authorize]
public IActionResult List() public IActionResult List()
{ {
return View(UserManager.Users); return View(UserManager.Users);
} }
[Authorize]
public IActionResult Create() public IActionResult Create()
{ {
return View(new IdentityUser()); return View(new IdentityUser());
} }
[HttpPost] [HttpPost]
[Authorize]
public async Task<IActionResult> Create([Bind] IdentityUser user, [Bind] string Password) public async Task<IActionResult> Create([Bind] IdentityUser user, [Bind] string Password)
{ {
if (ModelState.IsValid) if (ModelState.IsValid)