How to implement User-Level security in app ?
-
Hi i'm looking for any example or article about how to implement user-level security for mu application. my app scenario is : 1. My app have some forms 2. Users & Roles can define in app 3. Each user must have a role 4. Each role must have it's security level (admin can select a role and give a appropriate right on selected objects(forms) to that role) How to implement this ? A Good Idea : if u familiar with SharePoint, u saw, even users can assign a permission just for an specific Item! but don't know how to that. after a lot of search, i define some tables which represent in this image : http://i44.tinypic.com/142v439.jpg as u can see in that image, my tables are these : Users : to define user Roles : to define role UserRoles : store relationship between Users and Roles (which user member of which role) Rights : to define right (like Select,Insert,Update,Delete,Report, ...) Objects : to hold all objects(can be include database objects or application objects) which must be assign security level to Permissons : to hold which role on which object have which right. and now, i want to display this form and table to user : http://i42.tinypic.com/v75gzb.jpg in the form, admin can select a role from comboBox and set appropriate permission to an specific object, but i don't know how to query tables to display this table, and how to manage this data. i think the database design is correct but getting query is main problem, i want to manage security levels like second image. any help would be great appreciated.
-
Hi i'm looking for any example or article about how to implement user-level security for mu application. my app scenario is : 1. My app have some forms 2. Users & Roles can define in app 3. Each user must have a role 4. Each role must have it's security level (admin can select a role and give a appropriate right on selected objects(forms) to that role) How to implement this ? A Good Idea : if u familiar with SharePoint, u saw, even users can assign a permission just for an specific Item! but don't know how to that. after a lot of search, i define some tables which represent in this image : http://i44.tinypic.com/142v439.jpg as u can see in that image, my tables are these : Users : to define user Roles : to define role UserRoles : store relationship between Users and Roles (which user member of which role) Rights : to define right (like Select,Insert,Update,Delete,Report, ...) Objects : to hold all objects(can be include database objects or application objects) which must be assign security level to Permissons : to hold which role on which object have which right. and now, i want to display this form and table to user : http://i42.tinypic.com/v75gzb.jpg in the form, admin can select a role from comboBox and set appropriate permission to an specific object, but i don't know how to query tables to display this table, and how to manage this data. i think the database design is correct but getting query is main problem, i want to manage security levels like second image. any help would be great appreciated.
-
Thanks d@nish but most of those links, explains about .net security management and some other is old (not implement custom solution which save security data in database tables)
-
-
The asp.net has special functionality which does not provide in winForms. i just confusing how to use those tables that i've designed in first post.
The only thing different in that example is the part about the cookie. In a winforms app you can connect to a database and read and write data and hash the password which is essentially the same. Correct me if I'm wrong. It might not be the best of examples but it shows the principles :-D
-
The only thing different in that example is the part about the cookie. In a winforms app you can connect to a database and read and write data and hash the password which is essentially the same. Correct me if I'm wrong. It might not be the best of examples but it shows the principles :-D