<cflogin> isn't flexible enough for me. You have limited control over
your querying of that data...only the functions provided in CF. I do a
user table, a role-name table and a user-role table. The user table
holds basic user info. The role-name table holds info about the role
(name, description, etc). The user-role table ties the two together.
This allows the person to have multiple roles. Then, I just code in my
app that certain role-ids can do certain things. I've also done it
where the roles are numbered 0, 0,10, 20, 30, 40, 50 ,60,70,80,90 and
then if you need to create specific roles for certain sections of the
site, you can do it in between the existing roll numbers. Then you can
just check <cfif userRole GT 60> to see if the person is above 60 and if
so, that means they can do this certain thing, or you can check <cfif
userRole GT 90 or userRole EQ 43> to see if the user is an admin or if
they have a specific role to let them do this one thing.
John
-----Original Message-----
From: Tony Weeg [mailto:[EMAIL PROTECTED]
Sent: Friday, May 21, 2004 3:47 PM
To: CF-Talk
Subject: RE: user control - permissions - roles...
heck.
what am I thinking?
isnt there a isUserInRole() function in cf, that will check that kinda
stuff to?
to all list people: in your role based security applictions, how have
you done it?
with isUserInRole(), and cflogin, etc?
tw
-----Original Message-----
From: Tony Weeg [mailto:[EMAIL PROTECTED]
Sent: Friday, May 21, 2004 3:43 PM
To: CF-Talk
Subject: RE: user control - permissions - roles...
its up to you, really.
I guess you could cfcase/cfswitch it, as well.
tw
-----Original Message-----
From: Spectrum WebDesign [mailto:[EMAIL PROTECTED]
Sent: Friday, May 21, 2004 3:42 PM
To: CF-Talk
Subject: RE: user control - permissions - roles...
Thanx good... great job... but the thousands cfif's still need?
Thanx for your time.
----- Original Message -----
From: "Tony Weeg" <[EMAIL PROTECTED]>
Date: Fri, 21 May 2004 15:30:10 -0400
To: CF-Talk <[EMAIL PROTECTED]>
Subject: RE: user control - permissions - roles...
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]
- user control - permissions - roles... Spectrum WebDesign
- RE: user control - permissions - roles... Tony Weeg
- RE: user control - permissions - roles... Spectrum WebDesign
- RE: user control - permissions - roles... Burns, John D
- RE: user control - permissions - roles... Burns, John D
- RE: user control - permissions - roles... Spectrum WebDesign
- Re: user control - permissions - roles... Nick Han
- RE: user control - permissions - roles... Mike Kear
- RE: user control - permissions - roles... Mike Kear
- RE: user control - permissions - roles... Sandy Clark
- RE: user control - permissions - roles... Burns, John D
- Re: user control - permissions - roles... Jim