I suspect you have not made any security assertions on your class.
Casey, you were partly right... I had copied and pasted a very similar method (and it's security) but only remembered to change the actual method definition and not the security. *However*, correcting this mistake seems to have made no difference at all. I still receive exactly the same error message and traceback. To be sure, I deleted my product from the Control Panel (along with all instances), restarted Zope (2.5.1 btw) and then tested again... no joy though :-( Any more clues? I've got to say, 'context' and acquisition type stuff (if that's even relevant here) are pretty mysterious to me. cheers tim
On Thursday 15 August 2002 10:12 am, Tim Hicks wrote:
I have a XronDTMLMethod with the following body:
---- <dtml-let zoffice="superValues(['ZOffice Converter'])[0]"> <dtml-call "zoffice.getConverterByName('AsyncZlaveClient').fireNextConversion(_)"> </dtml-let> ----
So, it finds the nearest 'ZOffice Converter' instance (in the acquisition chain), names it 'zoffice', then attempts to do the call in the middle line.
My ZOffice class has the following method defined:
---- def getConverterByName(self, converterName): """ """ return self._pluginConverters[converterName].__of__(self) ----
self._pluginConverters is a class level dictionary with keys of converter names and values of converter instances. The converter instances inherit from Acquisition.Implicit.
However, when I 'Trigger' the XronDTMLMethod, I get the following error:
---- Traceback (most recent call last):
File "D:\Zlave\zope251\lib\python\Products\Xron\XronDTMLMethod.py", line 141, in trigger REQUEST=REQUEST, RESPONSE=RESPONSE, kw=kw)
File "D:\Zlave\zope251\lib\python\OFS\DTMLMethod.py", line 127, in __call__ r=apply(HTML.__call__, (self, client, REQUEST), kw)
File "D:\Zlave\zope251\lib\python\DocumentTemplate\DT_String.py", line 473, in __call__ try: result = render_blocks(self._v_blocks, md)
File "D:\Zlave\zope251\lib\python\DocumentTemplate\DT_Let.py", line 76, in render return render_blocks(self.section, md)
File "D:\Zlave\zope251\lib\python\DocumentTemplate\DT_Util.py", line 159, in eval return eval(code, d)
File "<string>", line 2, in f
File "D:\Zlave\zope251\lib\python\AccessControl\DTML.py", line 29, in guarded_getattr return guarded_getattr(*args)
File "D:\Zlave\zope251\lib\python\AccessControl\ZopeGuards.py", line 58, in guarded_getattr return inst.aq_acquire(name, aq_validate, validate)
File "D:\Zlave\zope251\lib\python\AccessControl\ZopeGuards.py", line 40, in aq_validate return validate(inst, obj, name, v)
File "D:\Zlave\zope251\lib\python\AccessControl\SecurityManager.py", line 83, in validate self._context)
File "D:\Zlave\zope251\lib\python\AccessControl\ZopeSecurityPolicy.py", line 145, in validate raise Unauthorized(name, value)
Unauthorized: You are not allowed to access fireNextConversion in this context ----
So, my question; why can't I call this method of my converter object?
cheers,
tim
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )