views:

42

answers:

2

hello

i wana work on a windows forms application that several users can work with different roles, for example 3 roles ,that "A role" only to access some parts of the program and cannot see and access it and "B role" can acess to entire of application, but some parts are just right to access and view, "C role" full access to all parts of the Application i have these roles and users in a database

whats a good way for make this application?

A: 

Your application should have a user management system and this system typically you would have the following entities in this system.

  • User
  • Group
  • Role
  • Permissions/Membership

These entities would have their master tables. And their relationship tables.

So for the above four entities:

  • Users would be tied to Groups,
  • Groups would be tied to Roles,
  • Roles would be tied to Permissions.

This is basic outline of the system which I earlier designed. So based on this structure you can build up your system and can give access to the different features and views in your system depending on the logged on user.

JPReddy
+1  A: 

In .net this mechanism its already exists: http://msdn.microsoft.com/en-us/library/system.security.principal.genericprincipal.aspx

you could combine this with your database

Sebastian Brózda