I'd think a structure.
<cfif structKeyFind(stAssets,thisAssetName)>
<cfset currentAccess=stAssets[thisAssetName]>
<cfelse>
<cfset currentAccess="none">
</cfif>
Abstract it into a function for better code re-use.
-----Original Message-----
From: David S. Neuman
Sent: Thursday, August 03, 2006 4:00 PM
To: CF-Talk
Subject: RE: Security Setup/Array Find
This question is an extension of the original question about the
security setup.
Is an array even the best way to go about this, or is there a better
way? Our security setup gives users different permissions for different
parts of the site. We broke down individual sections of the site into
assets, and for each asset the user gets a specific function.
User 1: Asset Function
A edit
B delete
C view
When the user comes to the page, we need to check to see if the asset is
there, and if so, the function the user has for that area. What is the
best way to handle this?
Thanks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:248756
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4