easiest way is in your usertable, where you store
usernames/passwords, have a roleId, and then when
they login and you process the login information, you can
set a session variable, that is their roleId, and then base some permissions
around that value.

how?

you can cfif yourself to death,

<cfif session.roleId eq 1>
You are god
<cfelseif session.roleId eq 2>
Your are a demi-god
<cfelseif session.roleId eq 3>
You are a sk8r boy
<cfelseif session.roleId eq 0>
You are sysadmin
</cfif>

I always like to keep roleID 0 for "Omniscient Role" where you are not only
the top level, but you are something bigger, code changer, etc.

Then you can rollup permissions too....

<cfif session.roleId lte 1>

You are here, because you are a god or demi god

<cfelseif session.roleId lte 3>

You are here, because you are a demi-god, god, or peon

</cfif>

anyway, you get the point.

:) tony

-----Original Message-----
From: Spectrum WebDesign [mailto:[EMAIL PROTECTED]
Sent: Friday, May 21, 2004 3:19 PM
To: CF-Talk
Subject: user control - permissions - roles...

Hi all

i'm looking for any example how to create an user control with roles
permissions... like Administrator is God, Managers could insert and change,
SK8er Boy could only view certain aspects from appl....

Please do you have any example?

Thanx in advance.
--
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to