[Zope] Migration pains going to Zope 2.8
Richard Jones
richardjones at optushome.com.au
Wed Aug 24 02:11:34 EDT 2005
I can't instantiate out Product, which is a bit of a hurdle :)
Our Product's registration looks like this (this function is invoked from the
Product's __init__.py):
def initialize(context):
''' Register the CGPublisher class '''
context.registerClass(
CGPublisher,
permission=Perm.ADD_CGPUBLISHERS,
constructors = (addCGPublisherForm, addCGPublisher, addValues,
getMode),
icon='www/CGPublisher.gif',
visibility='Global',
)
Unfortunately, the addCGPublisherForm template can't access the "addValues"
function. The specific error I get is:
Error Type: Unauthorized
Error Value: The container has no security assertions. Access to 'addValues'
of (App.ProductContext.__FactoryDispatcher__ object at 0xb61d30cc) denied.
I tried adding some module security declarations:
security = ModuleSecurityInfo('Products')
security.declarePublic('CGPublisher')
security = ModuleSecurityInfo('Products.CGPublisher')
security.declarePublic('addValues')
security.declarePublic('getMode')
to the initialize() function, but that didn't change anything. Any
suggestions?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20050824/dd13b7ce/attachment.bin
More information about the Zope
mailing list