Glenn Rathke
|
| Posted: 11/08/2002, 4:07 PM |
|
I have a Header with menu choices. I'd like to be able to hide choices based
up a users security. Can someone point me in the right direction.
Thanks
Glenn Rathke
|
|
|
 |
Kody Brown
|
| Posted: 11/10/2002, 10:07 PM |
|
This is really quite simple, I'm not sure about the exact steps in CCS,
because I mainly work with CC. These instructions should be general enough
for either version.
1) Create a Menus table in your database, with a display name, href of menu
location, and security level id.
2) Upon login set the User's security level, either by hand in code or
loaded from the Users table to a Session variable. (You could use the CC
built-in Login security level variable, if desired.)
3) Create a form in the Header page.
a) Type: Grid
b) Table: Menus
c) Form Action: [blank]
d) Create two fields, the MenuId, and DisplayName columns.
e) Set the DisplayName column Type to URL, In it's properties check use
URL field and specify the Href as the column.
In the forms property of the Header page, set the SQL parameter to
something like this (ASP code):
AccessLevel = " & Session("UserRights") & "
This will only select the menu items available to the User's security
level.
4) In the Login page, if there is a Session variable (usually the UserId)
active, make sure to clear the Session (in ASP Session.Abandon()) and
redirect to itself. This will make sure there is no extra crap in the
Session and automatically log the User out when they go to the Login page.
With this setup you will have to duplicate each Menu item for each security
level. You could create a connecting (many-to-many) table to provide a way
to create each Menu only once and have them show up under different security
levels.
I hope this helps. Sorry, so quick, I need to get to bed! Reply to the Group
if you need more help.
Kody
"Glenn Rathke" <grathke@attbi.com> wrote in message
news:aqhjkg$2h2$1@news.codecharge.com...
> I have a Header with menu choices. I'd like to be able to hide choices
based
> up a users security. Can someone point me in the right direction.
>
> Thanks
> Glenn Rathke
>
>
|
|
|
 |
|