поправил настройки для роли

parent 355dfcbe
......@@ -103,7 +103,7 @@ public class AccountsController : Controller
var claims = new List<Claim>
{
new Claim(ClaimsIdentity.DefaultNameClaimType, user.Email),
new Claim(ClaimsIdentity.DefaultNameClaimType, user.Role?.Name)
new Claim(ClaimsIdentity.DefaultRoleClaimType, user.Role?.Name)
};
ClaimsIdentity id = new ClaimsIdentity(
claims,
......
......@@ -20,7 +20,7 @@ public class HomeController : Controller
return View();
}
[Authorize(Roles = "admin, user")]
[Authorize(Roles = "admin")]
public IActionResult Privacy()
{
return View();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment