This could be normalised so that there is a user table, an enlitlement
table and an m:n joining table between them (user_entitlement or
similar). This way only a true (1) is indicated in the DB and you can
assume false for everything else (inlcuding when initialising the
struct in CF).


On 5/24/07, Robert Rawlins - Think Blue wrote:

> The structs method work nicely from a ColdFusion point of view, but I felt
> the database was a little untidy as you had a separate database column for
> each 'entitlement' which was set to 0 or 1 dependant on the permissions,
> each user then had a row in this table. This was then stored in the struct
> as key/value pairs with each entitlement having its one struct element and a
> 'true' or 'false' value, you can then do something like <cfif
> Session.User.Entitlements.DeleteUser> to check if the user has that
> permission.

-- 
mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:279047
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to