[Zope] Proxy role + zclass + python script = Unauthorized

Ayhan Ergul chaluba@yahoo.com
Fri, 24 Aug 2001 03:20:24 -0700 (PDT)


Folks,

I have a python script (called "clone") defined as a
method of a zclass that, when invoked on the instance
of the zclass (KM Chart Applet), makes a copy of the
instance in a different folder. This works fine when
the user has role manager, but fails with
"Unauthorized" complaining about the permission "Add
KM Chart Applets" although the script has proxy role
manager.

In the python script manage_copyObjects succeeds but
manage_pasteObjects fails (traceback below). Running
zope 2.3.3

Any clues why I'm losing the permission when running
the script proxied to manager as opposed to a user
with manager role? I don't think I'm running into the
post 2.2 policy of not propagating proxy roles, since
the python script is called directly from browser and
it calls the stock manage_....Objects() directly??

Ayhan


Traceback (innermost last):
  File
E:\PROGRA~1\TPMC_Z~1\lib\python\ZPublisher\Publish.py,
line 223, in publish_module
  File
E:\PROGRA~1\TPMC_Z~1\lib\python\ZPublisher\Publish.py,
line 187, in publish
  File
E:\PROGRA~1\TPMC_Z~1\lib\python\ZPublisher\Publish.py,
line 171, in publish
  File
E:\PROGRA~1\TPMC_Z~1\lib\python\ZPublisher\mapply.py,
line 160, in mapply
    (Object: clone)
  File
E:\PROGRA~1\TPMC_Z~1\lib\python\ZPublisher\Publish.py,
line 112, in call_object
    (Object: clone)
  File
E:\PROGRA~1\TPMC_Z~1\lib\python\Shared\DC\Scripts\Bindings.py,
line 324, in __call__
    (Object: clone)
  File
E:\PROGRA~1\TPMC_Z~1\lib\python\Shared\DC\Scripts\Bindings.py,
line 354, in _bindAndExec
    (Object: clone)
  File
E:\PROGRA~1\TPMC_Z~1\lib\python\Products\PythonScripts\PythonScript.py,
line 336, in _exec
    (Object: clone)
    (Info: ({'script': <PythonScript instance at
035AF170>, 'context': <KMChartApplet instance at
03510C10>, 'container': <KMChartApplet instance
at 03510C10>, 'REQUEST': <TemplateDict object at
36f2c70>, 'traverse_subpath': []}, (), {}, None))
  File Script (Python), line 19, in clone
    (Object: Traversable)
  File
E:\PROGRA~1\TPMC_Z~1\lib\python\OFS\CopySupport.py,
line 216, in manage_pasteObjects
    (Object: Traversable)
  File
E:\PROGRA~1\TPMC_Z~1\lib\python\OFS\CopySupport.py,
line 414, in _verifyObjectPaste
    (Object: Traversable)
Unauthorized: Add KM Chart Applets


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/