use role manager

  • Thread starter Thread starter Sami
  • Start date Start date
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
 
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/
 
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.
 
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.
 
Back
Top