summaryrefslogtreecommitdiff
path: root/Controllers
diff options
context:
space:
mode:
authorSergey Chebotar <s.chebotar@gmail.com>2023-03-07 08:23:53 +0300
committerSergey Chebotar <s.chebotar@gmail.com>2023-03-07 08:23:53 +0300
commit6b57030087d7690ec773bc588cd5f33670ca75cf (patch)
treee83fd738e4d2fc717d1f9e88f1a173ba47152534 /Controllers
parent45af463dbe359332967c75e4fdb8ab50e2d9e847 (diff)
Authorize account methods
Diffstat (limited to 'Controllers')
-rw-r--r--Controllers/AccountController.cs7
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)