store groups, subgroups and user (all roles) in a separate table. and make a new table and insert the primary key of role table into the second table as foreign key, hope it helps.
In your role table, you will have a permission level column, when create a new user, if the user isn't a admin, set his permission level the lowest level, such as guest. He has limit permission in your project. When you need to give him permission, make
sure your current user has modified permission, if not, change to another user. And then change his permission to proper one.
Thanks.
Please mark the replies as answers if they help or unmark if not.
Feedback to us
tdmca
Contributor
2396 Points
661 Posts
suggestion on database design
May 08, 2012 02:32 PM|LINK
i have to create database for persmission management
Group- > SubGroup -> Unit
Group, subgroup and unit are like roles in which i will add users,
so i want to know what tables and column i should design for giving different permission on different roles and users
cYpH3r x3r0
Member
327 Points
107 Posts
Re: suggestion on database design
May 08, 2012 03:14 PM|LINK
store groups, subgroups and user (all roles) in a separate table. and make a new table and insert the primary key of role table into the second table as foreign key, hope it helps.
tdmca
Contributor
2396 Points
661 Posts
Re: suggestion on database design
May 08, 2012 04:16 PM|LINK
you are talking about simple relation
how can i give permission
Chen Yu - MS...
All-Star
21584 Points
2493 Posts
Microsoft
Re: suggestion on database design
May 14, 2012 08:44 AM|LINK
Hi,
In your role table, you will have a permission level column, when create a new user, if the user isn't a admin, set his permission level the lowest level, such as guest. He has limit permission in your project. When you need to give him permission, make sure your current user has modified permission, if not, change to another user. And then change his permission to proper one.
Thanks.
Feedback to us
Develop and promote your apps in Windows Store