This is a good approach.  As "role" or "group" is a property of a user,  
the column should go in the table with the other user data.  Consider  
making a new table that contains possible rolls, like this:

RoleConfig
----------------
roleId (pk)
name
displayName

Then have your user table reference roles by ID.  That way, it is easy  
to 1) Retrieve a list of possible roles, and 2) Add new roles in the  
future.

Along the lines of what Stephen suggested, consider selecting * when  
authenticating the user, then storing all the information returned from  
your user table in a named array, then storing that array in the  
session (kind of like having a User "object").  Then, at any given  
time, on any page, you can base a condition (such as which reports to  
expose, etc) on any property of a user you want.

Cantrell

On Monday, December 2, 2002, at 06:47 AM, [EMAIL PROTECTED] wrote:

> Depends how much customisation you want to do, but if you want to set  
> up
> something more flexibile and extensible you really need to think about
> building in some kind of roles based access system.
>
> Basically you have Objects, Roles, Users:
>
> Objects - bits of the site - pages docs whatever
>
> These are assigned to Roles
>
> Roles are assigned to Users
>
> When you log-in a user you look up their roles
>
> When you want to check for access permission to a particular object  
> you look
> the list of objects assigned to those roles to see if they contain the
> object, and then allow or disallow access.
>
> Lots of ways you can implement that, takes some effort but worth it if  
> you
> are looking to offer extensive, maintainable customisation.
>
>
>
> -----Original Message-----
> From: Stephen Moretti [mailto:[EMAIL PROTECTED]]
> Sent: 02 December 2002 10:48
> To: CF-Talk
> Subject: Re: Personaliztion with Coldfusion ?
>
>
> Ian,
>
>> <CFQUERY DATASOURCE="#Application.DSN#" NAME="Security">
>>
> Hope that this is in CFMX, otherwise you need to be looking at  
> CFLOCK....
> ;o)
>
>
>>
>> For example I run a query to return a list of documents in my database
> table.
>>
>> Some of the records are available to view to everybody, however some  
>> of
> the records
>> are only available to view by TEAM 1 and some are only avaialble to  
>> TEAM
> 2.
>>
>> How can this type of personalization be built into the pages?
>>
> You need to query your database to find out which  "teams" that user  
> belongs
> to and then only select the documents that are available to everyone or
> those groups to which this particular user belongs to. Basically, just  
> grab
> the users teams when they log in and store them in a session variable  
> as
> well...
>
> Hope this helps point you in the right direction.
>
> Regards
>
> Stephen
>
>
>
>
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

Reply via email to