MVC5 Claims version of the Authorize attribute

后端 未结 5 673
情书的邮戳
情书的邮戳 2020-11-29 16:39

I\'m trying out some of the new stuff in VS2013 RC with MVC5 and the new OWIN authentication middleware.

So, I\'m used to using the [Authorize] attribut

5条回答
  •  情深已故
    2020-11-29 17:01

    [ClaimsPrincipalPermission(SecurityAction.Demand, Operation="Delete", Resource="Customer")]
    public ActionResult Delete(int id)
    {
        _customer.Delete(id);
        return RedirectToAction("CustomerList");
    }
    

    ClaimsPrincipalPermissionAttribute Class

提交回复
热议问题