[Zope-dev] DTML Documents/Folders in ZClasses fail to access anything
Itai Tavor
itai@optusnet.com.au
Wed, 21 Feb 2001 11:35:57 +1100
Hi,
I got a ZClass 'Test', with a DTML Method 'view' containing <dtml-var
id>, and a DTML Document 'view2' with the same line. instance/view
works. instance/view2 returns (ZDebug output):
Error type: Unauthorized
Error value: The object /test/view2, which is contained in
/test/view2, is marked as private.
Traceback (innermost last):
File /opt/Zope-2.3.0-linux2-x86/lib/python/ZPublisher/Publish.py,
line 222, in publish_module
File /opt/Zope-2.3.0-linux2-x86/lib/python/ZPublisher/Publish.py,
line 187, in publish
File /opt/Zope-2.3.0-linux2-x86/lib/python/ZPublisher/Publish.py,
line 171, in publish
File /opt/Zope-2.3.0-linux2-x86/lib/python/ZPublisher/mapply.py,
line 160, in mapply
(Object: view2)
File /opt/Zope-2.3.0-linux2-x86/lib/python/ZPublisher/Publish.py,
line 112, in call_object
(Object: view2)
File /opt/Zope-2.3.0-linux2-x86/lib/python/OFS/DTMLDocument.py,
line 189, in __call__
(Object: view2)
File /opt/Zope/lib/python/Products/ZDebug/DTMLLocator.py, line 103,
in __call__
(Object: view2)
File
/opt/Zope-2.3.0-linux2-x86/lib/python/DocumentTemplate/DT_String.py,
line 538, in __call__
(Object: view2)
File /opt/Zope/lib/python/Products/ZDebug/DTMLDebug.py, line 259,
in debug_render_blocks
File /opt/Zope/lib/python/Products/ZDebug/DTMLDebug.py, line 239,
in debugException
File /opt/Zope/lib/python/Products/ZDebug/DTMLDebug.py, line 256,
in debug_render_blocks
File /opt/Zope-2.3.0-linux2-x86/lib/python/OFS/DTMLMethod.py, line
261, in validate
(Object: view2)
File
/opt/Zope-2.3.0-linux2-x86/lib/python/AccessControl/SecurityManager.py,
line 144, in validate
File /opt/Zope/lib/python/Products/ZDebug/DebugSecurityPolicy.py,
line 304, in validate
Unauthorized: (see above)
The same happens if I place a copy of 'view' inside a Folder in the
ZClass and call instance/folder/view, except that this time the
Folder is flagged as the 'private' object.
Why? What? Is this a bug? Or is it supposed to work this way and I
just don't get it? Did I fall behind on my sheep sacrifices? Or was
it changed to goats and I missed the memo?
Environment: Zope 2.3.0, ZClass subclassing only ZObject, using stock
acl_users and storing the instance in a standard Folder.
--
--
Itai Tavor -- "Je sautille, donc je suis." --
itai@optusnet.com.au -- - Kermit the Frog --
-- --
-- "If you haven't got your health, you haven't got anything" --