?
Solved

Dreamweaver cs3 connecting users , defining levels

Posted on 2009-02-23
8
Medium Priority
?
261 Views
Last Modified: 2012-05-06
Hello there, I am fairly new on dreamweaver and I am seeking help on how to use the connect user, disconnect user, restrict access to page.  By playing around I am able so far to create a login page and when succesfully username and password redirect to a main page, howver I need to create also a new level not admin , and I need other level, and persahps oteher main2 pager.. Much help is appreciated. Code, Links to a good tutorial on this, or an explanation.

Thanks
0
Comment
Question by:RickyGtz
  • 4
  • 4
8 Comments
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 1600 total points
ID: 23715183
Hi RickyGtz,

>> Code, Links to a good tutorial on this, or an explanation.

Explanation.  In the table that holds your users, you need to have an additional column besides login and password that will define the user level.  This can be a text field (i.e., "User","Contributor","Moderator","Admin") or a numerical system (i.e., 1,2,3,4).  This column needs to be in place and populated before you go much further.

When you build the login system, you check submitted values against the username and password and if they match a user, you set the user level to a session variable and use it to do various things (redirect to a given page, show/hide regions on the page, etc).

The internal DW login behavior supports user levels as does the developer's toolkit and you will see the options in the Wizards for it.  

My personal preference is to use a numerical system whenever possible.   It allows you to set ranges of permissions much easier than text does.  So if your lowest level of user is defined as 1 and some function is available to everyone but that user, the definition is "allow if userlevel > 1" instead of "allow if userlevel = x or userlevel = y or userlevel = z"
0
 

Author Comment

by:RickyGtz
ID: 23715408
Hi thanks for your response. Can you briefly describ how can I use dreamweaver toolbox to create levels, see, I have the admin level 1  working, but the user (level 2 ) do I need to create another page for user,? or do I need to create another login transaction, this seems kind of confussing
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 23715587
>> Can you briefly describ how can I use dreamweaver toolbox to create levels

You create the levels in your database FIRST.  The wizards will only work properly if you do it that way.

Once you have the database set up the way you want it, you need to go to the developer toolkit control panel and click "Login Settings"

From there, choose Validate Against Username, password and access level in the Options tab

Set the fields in the Database tab

Set the session variables in the Session tab

In the User Level tab, you set the default AND user-level-specific redirection options for the login.

Once you have done all of that, you can use the Login Form Wizard to create a form to test the login behavior.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:RickyGtz
ID: 23715623
Thanks , Now I understand it!
Regarding my other doubt,, do I need to create separate login pages, (forms) to login as an admin or user?
Or Can I use a same form to query one table on database ?
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 23715721
>> do I need to create separate login pages, (forms) to login as an admin or user?
>> Or Can I use a same form to query one table on database

You should be able to use one login form to control everything.  The userlevel will be set in a session and that controls what happens after the user is logged in.  But the act of the login is the same no matter who is trying it, right?
0
 

Author Comment

by:RickyGtz
ID: 23715773
Well , no, I am having different loggedin page for admin and user , so It redirects diferent.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 23715803
Read my other answer.  You can define the redirection at the application level and use the same form to handle both types of users.  Check the Control Panel for the Developer's Tolkit and read the help files for Login Settings.
0
 

Author Closing Comment

by:RickyGtz
ID: 31550151
ok thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Integration Management Part 2
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question