OOPhoto: Implementing Security In An Object Oriented Application - Round I

<cffunction
	name="CheckPermissions"
	access="public"
	returntype="boolean"
	output="false"
	hint="I return a boolean flag as to whether or not the user can perform the given action.">
 
	<!--- Define arguments. --->
	<cfargument
		name="Action"
		type="string"
		required="true"
		hint="I am the action that is being performed."
		/>
 
	<cfargument
		name="Target"
		type="any"
		required="true"
		hint="I am the target object upon which the action is being performed."
		/>
 
	<!--- Pass off to the security service. --->
	<cfreturn VARIABLES.SecurityService.CheckPermissions(
		THIS,
		ARGUMENTS.Action,
		ARGUMENTS.Target
		) />
</cffunction>
 
 
<cffunction
	name="ConfirmPermissions"
	access="public"
	returntype="void"
	output="false"
	hint="I check to see if the user can perform the given action. If not, I rase an exception.">
 
	<!--- Define arguments. --->
	<cfargument
		name="Action"
		type="string"
		required="true"
		hint="I am the action that is being performed."
		/>
 
	<cfargument
		name="Target"
		type="any"
		required="true"
		hint="I am the target object upon which the action is being performed."
		/>
 
	<!--- Pass off to the security service. --->
	<cfset VARIABLES.SecurityService.ConfirmPermissions(
		THIS,
		ARGUMENTS.Action,
		ARGUMENTS.Target
		) />
 
	<!--- Return out. --->
	<cfreturn />
</cffunction>

For Cut-and-Paste