|
We intentionally put the security in the
objects themselves for several reasons:
I should also mention that the better part
of our business logic is contained in stored procedures, so a typical method is
really nothing more than an access check and then a stored procedure call.
In essence, our CF objects are really just a wrapper for our true business
objects, which are stored procedures. Roland From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of GroupOne Dev. Now that I say this however, I am
back to questioning whether this functionality should be in the object itself
or on the controller? Should an object be tied this tightly to the
authentication manager and the user or user group objects? Or, should the
document object strictly know about document stuff and leave authentication to
the controller since that does not specifically relate to a document? From:
"GroupOne Dev." <[EMAIL PROTECTED]> From:
"Roland Collins" <[EMAIL PROTECTED]> All of our objects require a user token to
be passed in and they then perform their own access checks using our
Authentication manager component. The authentication manager throws an
“AuthenticationException” if the user does not have the appropriate
level of access, and this gets logged, kicked to our error handler, or whatever
else we need to do. It winds up looking like this (in broken code, anyway). <cfobject
name=”SomeObject”> <cffunction
name=”getAccountBalance”>
<cfargument name=”userToken”>
<cfargument name=”accountNumber”>
<cfset var accountBalance = 0>
<cfinvoke component=”AuthenticationManager”
method=”checkUserAccess”>
<cfinvokeargument name=”userToken”
value=”#arguments.userToken#”>
<cfinvokeargument name=”requiredRight”
value=”NameOfRequiredRight”>
</cfinvoke>
<cfdotheprocessinghere>
<cfreturn accountBalance> </cffunction> </cfobject> HTH, Roland |
- RE: [CFCDev] OO Security? Roland Collins
- RE: [CFCDev] OO Security? GroupOne Dev.
- RE: [CFCDev] OO Security? Roland Collins
- RE: [CFCDev] OO Security? GroupOne Dev.
- RE: [CFCDev] OO Security? Roland Collins
- Re: [CFCDev] OO Security? Blaine Korte
- RE: [CFCDev] OO Security? Callum McGillivray
- RE: [CFCDev] OO Security? GroupOne Dev.
- Re: [CFCDev] OO Security? Peter J. Farrell
- RE: [CFCDev] OO Security? Seth MacPherson
- RE: [CFCDev] OO Security? Roland Collins
