close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Show Regions Based On User Levels

Thread began 3/28/2012 1:41 pm by josephpruski437489 | Last modified 3/29/2012 2:04 pm by Jason Byrnes | 1659 views | 5 replies |

josephpruski437489

Show Regions Based On User Levels

I am trying to create a page to show a region based on the user level column I've created in my users table in my database. I'm not having any luck creating a rule and server behavior to only show that region if the user is (i.e. Administrator, Power User, User, etc.)

I want to be able to show a different region based on the user's security level.

Thanks for any help with this.

Using:
Security Assist 2.05
Dreamweaver CS5

Sign in to reply to this post

Jason ByrnesWebAssist

in the archived documentation section of the security assist support page, there is a tutorial for "User Level Authentication". It was written for security assist 1, but the idea is the same.


On the login page, open the server behaviors panel (Window -> Server Behaviors). in the list, double click the Security Assist Authenticate User server behavior to edit it. On the 3rd step of the Authenticate User wizard, you can select columns from the user table to store in session variables, select the User Level column.

Now, create the access rules for the different levels. Go to Webassist -> Security Assist -> Manage Site Access -> Access Rules Manager.

you will need to create a new access rule for each user level. Set the condition to "Allow If". For the Value, Click the lightning bolt icon and select the user Level session variable. Set the Criteria to "=". For the Compare To option, enter the value that would be stored in the user level column for the user level you are creating the rule for.

Sign in to reply to this post

josephpruski437489

Got most of it... One thing I'm unsure of:

I've got most of it minus 1 thing regarding the server authentication...

1. Created table in database with a column entitled "Role" as an interger. From this I'll give each user a role that will post in to the column (i.e. "Admin" = 1, "Power User" = 2 and so on...)

When I go to Authenticate User server behavior wizard, instead of steps, I have tabs.
General, Database, and Session Values.

Here's where I get confused and need additional clarification:

In order to select the "Role" column as a session value on the Session Values tab, I must first select the Connection (got this), Table (got this) and user column (Which this would be the "Role" column) in the Database tab. But in order to complete this wizard, on the user column in the Database tab (Again I selected the "Role" column) it requires a value.

What would the value be if I'm trying to retrieve a session variable based on the Role column being an interger for each role (1,2,3)?

I included attachments of exactly what I'm looking at.

Thanks again for the help.

Sign in to reply to this post

Jason ByrnesWebAssist

nothing should be changed on the General or Database tabs. Only on the Session tab.


your set up is not quite right.

the roles table will define the roles that can be used, but you also need to add a roles column to your users table to set the role that the user belongs to.

the database tab should still have the users table selected.

the column in the general tab should be username and password, these should have the value set to come from the username and password form elements, these are the values used to see if the user exists in the users table. the database tab settings perform the login.

the session tab settings set session variables after the login is completed, only i the role column is a part of the users table can the role for the logged in user be set.

Sign in to reply to this post

josephpruski437489

Works.

Thanks for the help Jason.

Everthing works now.

Just in case anyone reading this thread has the same problem:

My mistake was putting an addition Authenticate User behavior on my login page when all I needed to do was add the "Role" session variable to the 2 existing session variables that were already in the Login page that was created by the wizard. (not sure why there are 2 Authenticate User behaviors, but I put it in both and it works)

Sign in to reply to this post

Jason ByrnesWebAssist

there are 2 authenticate user behaviors added to the login page for the 2 login scenarios:
1) Enter username and password in the login form and click submit
2) Select the remember me and autologin checkboxes.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...