Hello All !

After installing latest stable version of Zope (2.2.4) I tried to 
install ZFormulator version 0.2. And as result got 2 problems with
permissions system. First was in ZFormulator itself, and was corrected:

__roles__ = ('manager',)

was changed to 

__roles__ = ('Manager',)

but this bug correction worked fine for previous versions of Zope, 
and in current version adding of field produced error:

Attribute Error: aq_inContextOf in line 231 of
lib/python/AccessControl/User.py

I am nor Zope nor Python hacker, but I tried to correct this line a little,
and this worked for me. Please advice did I made it correct way or not.

User.py line 231:
----------------

Here was the original code (which produced error):

if not parent.aq_inContextOf(self.aq_parent.aq_parent,1):

Here is replacement (added check is attribute exists):

if hasattr(parent, 'aq_inContextOf') and not 
parent.aq_inContextOf(self.aq_parent.aq_parent,1):

After this correction everything works fine, but since I am not Zope/Python
guru, but just a user which wanted some program to start working, I keeping
changed locally, but of course I am interested was this correction OK.

Regards.

--
Alex V. Koval



_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to