[Zope] Permission disappears on server restart, ParsedXML, ZPT

Brad Clements bkc@murkworks.com
Sun, 12 Aug 2001 15:09:24 -0400


Running Zope 2.3.3 (no patches) on RH Linux 7.1

I have a product in Control_Panel. Products

In that product, there is a zclass that has a ParsedXML object in the product's methods 
folder.

The ParsedXML object is used within a python script (also a method of the zclass), 
called from a ZPT (also a method of the zclass) to render some javascript code.

Logged in users (even manager users) get an Unauthorized on the ParsedXML object, 
unless I set the "define permissions" tab on the Parsed XML object to 

"access contents information -->  access contents information"

Once this is done, the DOM can be traversed from the pythonscript.

However when I restart the server, that permission changes itself back to (disabled).

I have to manually reset the permission every time the server is started.

Anyone have an idea why this is so?

--

Here's the traceback.

Site Error
An error was encountered while publishing this resource. 

Unauthorized

You are not authorized to access ProductCategories. 
Traceback (innermost last):
  File /usr/holmes/AdkWood/lib/python/ZPublisher/Publish.py, line 223, in publish_module
  File /usr/holmes/AdkWood/lib/python/ZPublisher/Publish.py, line 187, in publish
  File /usr/holmes/AdkWood/lib/python/ZPublisher/Publish.py, line 171, in publish
  File /usr/holmes/AdkWood/lib/python/ZPublisher/mapply.py, line 160, in mapply
    (Object: Edit)
  File /usr/holmes/AdkWood/lib/python/ZPublisher/Publish.py, line 112, in call_object
    (Object: Edit)
  File /usr/holmes/AdkWood/lib/python/Shared/DC/Scripts/Bindings.py, line 324, in __call__
    (Object: Edit)
  File /usr/holmes/AdkWood/lib/python/Shared/DC/Scripts/Bindings.py, line 354, in _bindAndExec
    (Object: Edit)
  File /usr/holmes/Zope-2.3.3/lib/python/Products/PageTemplates/ZopePageTemplate.py, line 244, in _exec
    (Object: Edit)
  File /usr/holmes/Zope-2.3.3/lib/python/Products/PageTemplates/PageTemplate.py, line 156, in pt_render
    (Object: Edit)
    (Info: {'container': <CompanyProduct instance at 8902710>,
 'here': <CompanyProduct instance at 8902710>,
 'modules': <Products.PageTemplates.ZPythonExpr._SecureModuleImporter instance at 85874a0>,
 'nothing': None,
 'options': {'args': ()},
 'request': <h3>form</h3><table></table><h3>cookies</h3><table><tr valign="top" align="left"><th>zmi_use_css</th><td>'1'</td></tr><tr valign="top" align="left"><th>sql_pref__cols</th><td>'75'</td></tr><tr valign="top" align="left"><th>zmi_top_frame</th><td>'1'</td></tr><tr valign="top" align="lef
 'root': <Application instance at 8810588>,
 'template': <ZopePageTemplate instance at 8902950>,
 'traverse_subpath': [],
 'user': bkc})
  File /usr/holmes/Zope-2.3.3/lib/python/TAL/TALInterpreter.py, line 232, in __call__
  File /usr/holmes/Zope-2.3.3/lib/python/TAL/TALInterpreter.py, line 265, in interpret
  File /usr/holmes/Zope-2.3.3/lib/python/TAL/TALInterpreter.py, line 503, in do_insertStructure_tal
  File /usr/holmes/Zope-2.3.3/lib/python/Products/PageTemplates/TALES.py, line 283, in evaluate
  File /usr/holmes/Zope-2.3.3/lib/python/Products/PageTemplates/Expressions.py, line 213, in __call__
  File /usr/holmes/Zope-2.3.3/lib/python/Products/PageTemplates/Expressions.py, line 210, in _eval
    (Info: here)
  File /usr/holmes/Zope-2.3.3/lib/python/Products/PageTemplates/Expressions.py, line 146, in render
    (Object: CategoriesToJava)
  File /usr/holmes/Zope-2.3.3/lib/python/Products/PageTemplates/ZPythonExpr.py, line 134, in call_with_ns
    (Object: CategoriesToJava)
  File /usr/holmes/Zope-2.3.3/lib/python/OFS/DTMLMethod.py, line 182, in __call__
    (Object: CategoriesToJava)
  File /usr/holmes/Zope-2.3.3/lib/python/DocumentTemplate/DT_String.py, line 540, in __call__
    (Object: CategoriesToJava)
  File /usr/holmes/Zope-2.3.3/lib/python/DocumentTemplate/DT_In.py, line 655, in renderwob
    (Object: ProductCategories.getElementsByTagName('Category'))
  File /usr/holmes/Zope-2.3.3/lib/python/DocumentTemplate/DT_Util.py, line 333, in eval
    (Object: ProductCategories.getElementsByTagName('Category'))
    (Info: ProductCategories)
  File /usr/holmes/Zope-2.3.3/lib/python/Products/PageTemplates/ZPythonExpr.py, line 124, in validate
    (Object: Traversable)
  File /usr/holmes/AdkWood/lib/python/AccessControl/SecurityManager.py, line 144, in validate
  File /usr/holmes/AdkWood/lib/python/AccessControl/ZopeSecurityPolicy.py, line 199, in validate
Unauthorized: (see above)



Brad Clements,                bkc@murkworks.com   (315)268-1000
http://www.murkworks.com                          (315)268-9812 Fax
netmeeting: ils://ils.murkworks.com               AOL-IM: BKClements