Attach a User Role: “Admin” to single html element
Ruan Knoetze
1
Reputation point
I have user roles that link in a custom AuthorizeAttribute above my controller.(I use Asp.net framework)
I want the admin user to enter the area where they would have got a 401 error. (removed some code to keep it simple)
[PermissionBaseAuthorize(Role = "super_admin")]
public ActionResult Details()
{
return View()
}
Once that is done I want the admin user to only be able to edit the email field in the Customer details view for example and not any of the other fields in the form on this View.
Please help if there is a simpler way of doing it please share
c#
Sign in to answer