Posted on: 3/9/2014 1:34:56 PM | Views : 643

Working with VS2013, asp.net forms authentication, C#.
I have an asp.net app that was created with the idea that various pieces of the application would require specific rights to either display or perform actions.  The model seems simple enough:
The idea is that a User is assigned to 1 or more Roles.....and a Role contains 1 or more permissions.  The existing structure in the database is pretty simple. 
UsersTable - list of users
RolesTable - list of roles
PermissionsTable - list of permissions
UserRoleTable - link Users and Roles ( which roles each user belongs to)
PermissionRoleTable - link Permission and Roles ( permissions included in each role )

Once logged in, the application needs to periodically inspect the permissions that a user has in order to do (or not do) something.
So it has code sprinkled around like:
    if (user.hasright(permissionXXX))....do somethi ...

Go to the complete details ...