Factory method needs superuser authentication
Hi. I wrote a product when reading the Developers Guide for Zope 2.4. Now i ran into a problem I can't resolve: The Product is registered successfully and i can click "add" in a folder view. Then it asks me some things on the add-form (everything is right til now). But when i then click add, zope refuses to call the manage_addDefaultCrosstable and prompts me for proper authentication. I have been logged in as manager, and then changed to the superuser account. As superuser he allowed me to call the factory method but refused to create the object (naturally). What do i have to look for? I added some parts of the involved files. Thanks again Christian --- GCrosstable.py [...] def manage_addDefaultCrosstable(self, id, REQUEST=None): """Factory for instanciating a crosstable.""" handler=DefaultCrosstable(id, REQUEST) self._setObject(id, handler) --- __init__.py import GCrosstable def initialize(registrar): registrar.registerClass( GCrosstable.DefaultCrosstable, constructors = (GCrosstable.manage_addDefaultCrosstableForm, GCrosstable.manage_addDefaultCrosstable), ) --- dtml/addCrosstable.dtml <form action="manage_addDefaultCrosstable." method="post"> <table cellspacing="0" cellpadding="2" border="0"> <tr> -- Christian Theune - ct@gocept.com gocept gmbh & co.kg - schalaunische strasse 6 - 06366 koethen/anhalt tel.+49 3496 3099112 - fax.+49 3496 3099118 mob. - 0178 48 33 981 reduce(lambda x,y:x+y,[chr(ord(x)^42) for x in 'zS^BED\nX_FOY\x0b'])
Christian Theune writes:
... But when i then click add, zope refuses to call the manage_addDefaultCrosstable and prompts me for proper authentication. Looks as if the constructor were not protected by a permission.
I do not know how that can be, as I though, that "register" would associate a default one, if none was given. Dieter
Well, the developers guide told that it is not required to provide a constructor permission, because Zope will use 'Add '+Class.meta_type+'s' in that case. But i will try to modify this. On Mon, Jul 30, 2001 at 07:49:52PM +0200, Dieter Maurer wrote:
Christian Theune writes:
... But when i then click add, zope refuses to call the manage_addDefaultCrosstable and prompts me for proper authentication. Looks as if the constructor were not protected by a permission.
I do not know how that can be, as I though, that "register" would associate a default one, if none was given.
Dieter
-- Christian Theune - ct@gocept.com gocept gmbh & co.kg - schalaunische strasse 6 - 06366 koethen/anhalt tel.+49 3496 3099112 - fax.+49 3496 3099118 mob. - 0178 48 33 981 reduce(lambda x,y:x+y,[chr(ord(x)^42) for x in 'zS^BED\nX_FOY\x0b'])
participants (2)
-
Christian Theune -
Dieter Maurer