Permission based access control

Posted by jellysaini on Stack Overflow See other posts from Stack Overflow or by jellysaini
Published on 2012-07-26T07:02:09Z Indexed on 2012/08/29 15:38 UTC
Read the original article Hit count: 134

Filed under:
|

I am trying to implement permission based access control in ASP.NET. To implement this I have created some database tables that hold all the information about which roles are assigned what permissions and which roles are assigned to what user.

I am checking the permissions in the business access layer. Right now I have created a method which checks the permissions of the user. If the user has permissions then okay otherwise it redirects to another page.

I want to know if the following things are possible?

class User
{
    [PremissionCheck(UserID,ObjectName,OperationName)]
    public DataTable GetUser()
    {
        //coding for user
    }
}

I have seen it in MVC3. Can I Create it in ASP.NET? If yes then how can I implement it?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about security