use role manager

S

Sami

hi im new to asp.net
i would like to use the role manager to only show certain items when the
current user is a member of a particular role.

The items table looks like this-
ID | NAME | TEXT


what should I add to this table to make this work?
an uniqueidentifier RoleId? but what if i want to associate multiple roles
with this item?

thank you
Sami
 
M

Mr. Arnold

Sami said:
hi im new to asp.net
i would like to use the role manager to only show certain items when the
current user is a member of a particular role.

The items table looks like this-
ID | NAME | TEXT


what should I add to this table to make this work?
an uniqueidentifier RoleId? but what if i want to associate multiple roles
with this item?

It talks about the whole thing tables and all that are needed. What is this
items table for?

http://www.codeguru.com/csharp/.net/net_security/authentication/article.php/c7415/
 
M

Mr. Arnold

Sami said:
they are user submitted messages

Then you might be able to do something like this, possibly

tblUserRoleByRoleIdMsgs

Long Recid -- auto increment primary key
Long UserId
Long RoleID
Long MsgItemId --- the primary key in the tblMsgItems

That way, you populate the tblUserRoleByRoleIdMsgs with the appropriate
data, with many user-id(s), with may Roleid(s) tied to a User-Id and a
MsgItemId with the MsgItemId pointing to a record in the tblMsgItems.

You can then select by UserId and/or RoleId and Innerjoin on tblMsgItems
MsgItemId with
tblUserRoleByRoleIdMsgs MsgItemId and pull the tblMsgItems records for the
user-id that has many roles tied to many ItemMessages.

That's one way of doing it I guess. I hope you get the picture.
 
H

HillBilly

Have you learned about the LoginView control Sami? It uses HTML templates to
allow us to use Roles to manage what is and what is not seen in the page.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top