<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I've written a Zope product that exposes a 
"MenuItem". I add a menuItem in a Zope folder, and I have no difficulty 
accessing and editing&nbsp;it via the ZMI. I've written an xml-rpc-like protocol 
for Zope, that basically validates the security "manually". </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>This menuItem has an attribute called "def 
getVersion(self):" which returns an int.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>This is the Code that prevents me from accessing 
the method in python, via my protocol:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>if not 
AccessControl.getSecurityManager().validate(None, <STRONG>object</STRONG>, 
<STRONG>attributes[-1]</STRONG>):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
raise UnauthorisedAccessException('Unauthorised: ' + 
originalAddress)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><STRONG><FONT face=Arial size=2>object = </FONT></STRONG><FONT face=Arial 
size=2>&lt;bound method HWMenuItem.getVersion of &lt;HWMenuItem instance at 
01B7B290&gt;&gt;</FONT></DIV>
<DIV><FONT face=Arial 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
This is the method getVersion</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><STRONG>attributes[-1] </STRONG>=<STRONG> 
</STRONG>"getVersion" (string)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><STRONG>UnauthorisedAccessException: Unauthorised: 
menus.administration.addUser.getVersion</STRONG></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>This code works for any other default Zope type, 
but not mine. Did I perhaps forgot a permission or something?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I can access this fine via the ZMI, but when I 
validate it this way, python just starts cursing at me.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Can somebody help?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Thanks</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>H</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></BODY></HTML>