Click here to Skip to main content
15,892,643 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,friends.
i am new in mvc3.
I have 3 tables for role model:
1)user_master(user_id,username,password);
2)role_master
(role_id,role_name);
3)role_to_user
(role_id,user_id);

and I want to apply one user to multiple role like user id =1 and given role 1.taskcreate, 2.taskupdate, 3.create company account how can i perform User.IsInRole() condition with this roles.

thank you.
Posted
Updated 14-Apr-12 1:20am
v4
Comments
[no name] 2-Apr-12 2:45am    
<pre> tag is not required for your question.

1 solution

You can do it easily.

Just assign multiple roles to one user in role_group_master table.

role_group_id role_id user_id
1 10 52
2 22 52
3 33 52


Hope this help!
 
Share this answer
 
Comments
member60 14-Apr-12 7:54am    
my 5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900