Using the ones in between the 10s would only be for a special case.
Other than that, you'd just have your basic 10 (0,10,20...90).  You
don't have to give each user their own role.  It depends on the app and
the needs.  I just know that I've thought too small in the past and it
ended up coming back to bite me later.  If your app only needs a couple
of roles, I don't understand what it is that you're asking for
suggestions for.  That sounds quite easy and for you <cflogin> would
probably work with its associated functions.

John Burns

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

Thanx John

but using your suggestion maybe our code will become very hard to
maintain...

Look this:

<cfif UserRole is 34 OR UserRole is 56>
Click here to edit this record
</cfif>
<cfif UserRole is 67 OR UserRole is 81>
Click here to delete this record
</cfif>

Why you don't use Group Roles?

Thanx once more again
----- Original Message -----
From: "Burns, John D" <[EMAIL PROTECTED]>
Date: Fri, 21 May 2004 16:07:22 -0400
To: CF-Talk <[EMAIL PROTECTED]>
Subject: RE: user control - permissions - roles...

The body of your email message is over 100 lines. Unless you are a major
writer, your probably adding a lot of the previous replies. Please trim
your posts when replying. Thank you.

<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
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to