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.
Comments
Post a Comment