← Back to team overview

launchpad-dev team mailing list archive

Re: check_permission removed from security.py

 

Am 19.04.2011 13:39, schrieb Julian Edwards:
> On Tuesday 19 April 2011 12:12:30 Henning Eggers wrote:
>> Please make use of forwardCheckAuthenticated and do not re-introduce
>> check_permission into security.py. Thank you. ;-)
> 
> Thanks for making this change Henning.
> 
> 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 :)

I totally agree.

With this I aimed to replace the check_permission functionality which gives
you dynamic look-up for inherited Interfaces. If that flexibility is not
needed the static approach is the simplest and most direct one.

Henning


References