Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Levels

Status
Not open for further replies.

tsp1lrk

IS-IT--Management
May 30, 2001
103
US
Hello!

I want to create a password protected site using Access Levels; what is the best way to get started with this? I'm famaliar with CF, SQL so that's not a problem, I'm just wondering how I can get this started and how the code would flow. Appreciate any insight- any code available that I can see?

Thanks,
Lisa
 
One fairly straightforward way to do it would be create a table in your database for "access levels", and have different levels like "level 1 - basic user", "level 2 - management", "level 3 - administrator", etc... Then, assign an appropriate access level to each User in the database. On your site, you can use cfif statements to manage who can see what according to their access level.


Hope This Helps!

Ecobb

"My work is a game, a very serious game." - M.C. Escher
 
Hey! Thanks for the info- now based on the access level, are they actually re-directed to different pages? Just curious because I imagine that's alot of work to have all these different pages for different levels. That's where I'm kinda stuck.

Lisa
 
That's up to you. You're writing the application and pages, so you can make them function however you want to. You can have everyone access all of the pages and just use <cfif> statements on that page to determine what each person sees, or you could allow access to all pages but have CF display and &quot;Access Denied&quot; message for users without specific permissions, or you can use <cfif> statements to determine what links show up in your navigations menu and each person only sees to the links to the pages they have access to, ect....

I'm sure there's a dozen different ways to handle it, you just have to determine what's best for your particular application. Personally, I use a combination of all of them :)


Hope This Helps!

Ecobb

&quot;My work is a game, a very serious game.&quot; - M.C. Escher
 
The simplest method might be to create directories for each access level in a master directory..

members/access1
members/access2
members/access3

And then you can say in application.cfm:

<cfif cgi.script_name contains &quot;/members/access&quot;>
<cfif not cgi.script_name contains &quot;/members/access#AccessField#/&quot;>
Access Denied!!! (or anything else you want here)<cfabort>
</cfif>
</cfif>

ALFII.com
---------------------
If this post answered or helped to answer your question, please reply with such so that forum members with a similar question will know to use this advice.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top