I've used this approach, but I've liked using structures of roles more
than arrays. It lets me do a userIsInRole(string rolename) method
that just returns structKeyExists(variables.instance.roles,
"employee"). I was wondering what you thought of this approach?
Thanks,
Joe
----- Original Message -----
From: Sean Corfield <[EMAIL PROTECTED]>
Date: Thu, 22 Jul 2004 15:17:36 -0700
Subject: Re: CFC Design for Multiple Person Roles
To: CF-Talk <[EMAIL PROTECTED]>
> Currently, I have a single CFC that wraps all three user roles in one.
> I don't really care for that method, but I haven't seen a solution, good
> or bad, that lets me break up the different roles into separate objects.
The "classic" solution is to have a Role CFC that is extended as
Employee, Faculty and Student (three CFCs) and then User "has a" array
of Role objects.
So:
Employee is-a Role
Faculty is-a Role
Student is-a Role
and
User has-a Role array
--
Sean A Corfield -- http://www.corfield.org/blog/
"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood________________________________
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

