Page Authentication
I have an application where I am setting user roles using cfloginuser. I restrict some pages depending on roles. I am just using a if statement at the top of the page similar to this:
<cfif IsUserInRole("admin")>
PAGE CONTENT
<cfelse>
<cflocation url="unathorized.cfm" addtoken="no">
</cfif>
This is working fine, but I am now wanting to expand the roles. I want to display or reject each page depending on the roles. However, I am not wanting to add an if statement to every page. Can anyone point me to a better method? I know I am missing something very easy, but I would like an easy non-obtrusive way to do this. Thanks for the suggestions.
