Best way to implement multiple roles and permissions in c# web app? -


I want to implement the roles and permissions on a web app on which we have created and I'm looking at using the system Am Web .Security To apply this, SqlRoleProvider my problem is that each customer wants to be able to configure what action can and can not do in the system and no two clients want the same , Which will not be enough to complete the basic administration, user, manager roles.

What I am proposing to do for each screen, thus creating roles

  screen 1 creature, screen 1 update, remove screen 1, screen 1 screen Read, screen 2 update, remove screen 2, screen 2 read  

and so on.

Then I allow the customer to select rows per user, which will be stored in the cookie when entering the user.

I could read the cookie and use user.isinrole to check that each method can be called by the current user.

I know there is a size barrier with cookies about which I should be aware of. Besides, this sound probably does, is there a better way to do this?

Many thanks for any input.

In fact if you want to program it at all the cookie level by yourself, then you open the security hole Are taking risks. The way to do this is with form authentication in conjunction with role-based authentication. Asp.net will give the user a tampering cookie.

If you apply roles you can easily mark the methods:

  [PrincipalPermission (SecurityAction.Demand, Role = "Screen1Create")] < / Code> 

Or use the code to see if there is a particular role.

Too many information:


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -