security - Manage User and Roles -


in wpf desktop sample book store application want manage users , roles. multiple users want achieve below points

1) application should have multiple user
2) user has 3 categories a) admin b) manager c) employee
3) application can have multiple roles like, add books, sale books, update stocks, generate purchase order etc
4) user should able assign , remove roles of other user lower in herarchy. ideal user herarchy :-

a) admin - top having full rights
b) manager - having roles added , removed admin
c) employee - having roles added , remover manager / admin.

i need approach implenet it. approach should flexible in future roles , user addition / removal easy; without change of database structure , line of codes. higher manager can assign roles individual employee.

first, refer "categories" "roles" , current "roles" "privileges" need following tables user, roles, privileges, userroles, , userprivileges. build app logic around records in link tables. there pretty useful membership providers out there(depending on db) can implement instead of doing scratch. need add privilege tables , procs.

provider example video wpf


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -