I want to use an [Authorize()]
attribute in the following way on an action:
[Authorize(Roles = "Administrator" or UserId == id)]
public ActionResult Edit(int id){ }
Right now I'm using logics like this:
public ActionResult Edit(int id)
{
if (User.IsInRole("Administrator") || User.Identity.Name.Equals(id))
{ }
}