<cffunction
name="ConfirmPermissions"
access="public"
returntype="void"
output="false"
hint="I check to see if the given user can perform the given action. If not, I rase an exception.">
<cfargument
name="User"
type="any"
required="true"
hint="I am the user in question."
/>
<cfargument
name="Action"
type="string"
required="true"
hint="I am the action being performed."
/>
<cfargument
name="Target"
type="any"
required="true"
hint="I am the target object upon which the action is being performed."
/>
<cfif THIS.CheckPermissions(
ARGUMENTS.User,
ARGUMENTS.Action,
ARGUMENTS.Target
)>
<cfreturn />
<cfelse>
<cfthrow
type="OOPhoto.AccessDenied"
message="You do not have permission to perform this action."
detail="You do not have permissions to perform the action, #ARGUMENTS.Action#, on the given object."
/>
</cfif>
</cffunction>