26 Sep
2006
26 Sep
'06
4:28 p.m.
Since Zope 2.8 you can no longer borrow methods from other classes like this. You have to borrow the function implementation. SpecialUser.allowed = PF2SpecialUser.PF2SpecialUser_allowed.im_func Stefan On 26. Sep 2006, at 16:33, Mark Wilson wrote:
# now the monkey patching - ooh ooh eeeek ooh
# save original method for use by superuser # (see PF2SpecialUser.PF2SpecialUser_allowed) PF2SpecialUser.PF2Superuser_allowed = SpecialUser.allowed # replace with our custom method SpecialUser.allowed = PF2SpecialUser.PF2SpecialUser_allowed
-- Anything that happens, happens. --Douglas Adams