开发者

reject user to specific view?

开发者 https://www.devze.com 2023-01-08 15:28 出处:网络
i have mvc2 project and i make custom role Provider I\'m using attributes [Authorize(Roles = \"Admin\")] to prevent an authorized user from doing some actions

i have mvc2 project and i make custom role Provider I'm using attributes [Authorize(Roles = "Admin")] to prevent an authorized user from doing some actions that always reject user to log in view i want to change that and redirect user to view that I'm tilling him开发者_开发百科 that he isn't authorized for this action

    [Authorize(Roles = "Admin")]
public ActionResult delete(int id)
    {
       ...........
    }


This is a recurring question: Here & Here

0

精彩评论

暂无评论...
验证码 换一张
取 消