Good points in favor of Roles James.
To extend M!ke's previous cftry/cfcatch example for handling roles, what
happens when many roles exist - maybe 5, 10 or 100... Does people's code
actually end up looking like this:
<!--- admins --->
<cftry>
<cfset result = myAdminFunc()>
<cfcatch type="any">
<!--- power users --->
<cftry>
<cfset result = myAdminFunc()>
<cfcatch type="any">
<!--- users --->
<cftry>
<cfset result = myAdminFunc()>
<cfcatch type="any">
<!--- guests --->
<cftry>
<cfset result = myAdminFunc()>
<!--- anonymous --->
<cfcatch type="any">
<cfset result = myNormalFunc()>
</cfcatch>
</cftry>
</cfcatch>
</cftry>
</cfcatch>
</cftry>
</cfcatch>
</cftry>
Cheers,
Baz
-----Original Message-----
From: James Holmes [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 07, 2006 7:35 PM
To: CF-Talk
Subject: Re: User, Permission Management
They are great when sharing a CFC with another developer. They add a
level of self-documentation and prevent someone who doesn't read
documentation from incorrectly providing people access to the wrong
things. It'a about keeping the CFC self-contained and ensuring the
integrity of the app in the business logic rather than hoping the
developer gets it right in the interface logic or elsewhere.
On 1/8/06, Dawson, Michael <[EMAIL PROTECTED]> wrote:
> Maybe I'm a bit daft, but I never really understood the logic of using
> CFC roles.
--
CFAJAX docs and other useful articles:
http://jr-holmes.coldfusionjournal.com/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228746
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54