diff options
author | Sergey Chebotar <s.chebotar@gmail.com> | 2023-03-07 08:23:53 +0300 |
---|---|---|
committer | Sergey Chebotar <s.chebotar@gmail.com> | 2023-03-07 08:23:53 +0300 |
commit | 6b57030087d7690ec773bc588cd5f33670ca75cf (patch) | |
tree | e83fd738e4d2fc717d1f9e88f1a173ba47152534 /Controllers | |
parent | 45af463dbe359332967c75e4fdb8ab50e2d9e847 (diff) |
Authorize account methods
Diffstat (limited to 'Controllers')
-rw-r--r-- | Controllers/AccountController.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Controllers/AccountController.cs b/Controllers/AccountController.cs index 432b671..aed29fc 100644 --- a/Controllers/AccountController.cs +++ b/Controllers/AccountController.cs @@ -16,17 +16,22 @@ public class AccountController : Controller SignInManager = signInManager; } + + [Authorize] public IActionResult List() { return View(UserManager.Users); } + + [Authorize] public IActionResult Create() { return View(new IdentityUser()); } - [HttpPost] + [HttpPost] + [Authorize] public async Task<IActionResult> Create([Bind] IdentityUser user, [Bind] string Password) { if (ModelState.IsValid) |