Authorize account methods
This commit is contained in:
parent
45af463dbe
commit
6b57030087
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user