On 19 April 2011 12:39, Julian Edwards <[email protected]> wrote:
> Another pattern that can be used is to construct the appropriate adapter
> directly and run its checkAuthenticated() method, which is what many of the
> existing adapters already do.  I think I prefer this to introducing the extra
> level of indirection in forwardCheckAuthenticated() but YMMV :)

By skipping the adapter lookup there is a small (very small?) risk
that the code may one day not use the configured security policy for
the given object. In essence it short-circuits the configuration of
security policy, and is probably a violation of DRY, though it's
hardly an egregious one. I think forwardCheckAuthenticated() should be
preferred, if only by a slight margin.

_______________________________________________
Mailing list: https://launchpad.net/~launchpad-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to