From: Maurits v. R. <svn...@pl...> - 2008-08-05 16:26:31
|
Author: maurits Date: Tue Aug 5 16:26:13 2008 New Revision: 69516 Modified: xm.booking/branches/0.5/xm/booking/browser/viewlets.py Log: Use __allow_access_to_unprotected_subobjects__ to give access to the 'allowed' attribute of the add booking form viewlet in case this viewlet gets rendered within a KSS view (while adding a booking using that same form), which messes up the Acquisition chain or something... Modified: xm.booking/branches/0.5/xm/booking/browser/viewlets.py ============================================================================== --- xm.booking/branches/0.5/xm/booking/browser/viewlets.py (original) +++ xm.booking/branches/0.5/xm/booking/browser/viewlets.py Tue Aug 5 16:26:13 2008 @@ -23,6 +23,12 @@ class BookingForm(ViewletBase): implements(BookingFormInterface) + # Apparently this is needed to give access to the 'allowed' + # attribute in case this viewlet gets rendered within a KSS view + # (while adding a booking using this form), which messes up the + # Acquisition chain or something... + __allow_access_to_unprotected_subobjects__ = 1 + def allowed(self): """Is the user allowed to add a booking here? """ |