----- Original Message ----- From: "Dieter Maurer" <[EMAIL PROTECTED]>
Sent: Saturday, March 10, 2007 2:38 AM
Subject: Re: [Zope] External Methods and Authentication error

Jonathan wrote at 2007-3-8 09:27 -0500:
 Module /apps/Zope-2.9.2/Extensions/playwiser-1.0.py, line 3228, in
 Module OFS.PropertyManager, line 320, in manage_changeProperties
 Module Shared.DC.Scripts.Bindings, line 311, in __call__

This looks funny.

 Your "manage_changeProperties" calls a DMTL object.

This looks like a nameclash. I guess you have overridden some
method of "PropertyManager" with a DML object.

Check line 320 in "OFS/PropertyManager.py" what method is called
there and why it is a DTML object.

Dieter, thanks for the lead, but it is all very strange and I really don't understand what is happening...

External Method:

# threadFolder is a BTreeFolder2; viewCount is a property field on the BTreeFolder2

line 3227: threadFolder = self.unrestrictedTraverse(topFolder + forumId + '/' + threadId) line 3228: threadFolder.manage_changeProperties({'viewCount': threadFolder.viewCount+1})


line 299:       def manage_changeProperties(self, REQUEST=None, **kw):
line 317:        if REQUEST:
line 318:            message="Saved changes."
line 319:            return self.manage_propertiesForm(self,REQUEST,
line 320: manage_tabs_message=message)

The call to manage_changeProperties in the External Method does not contain REQUEST, therefore line 320 in PropertyManger.py should never get executed, but it is part of the error traceback (copy below).

This error goes away if I change the 'Access contents information' security setting from 'Manager' to 'Anonymous'.

At this point I am rewriting the application to move the counts (and other update-intensive fields) from the property fields of the BTreeFolder2 and put them into a MySQL db. I expect that this will eliminate the error, but if anyone has any ideas as to what caused the error I would love to know! (i hate unresolved issues).

Thanks again for the assistance.


Traceback (innermost last):
 Module ZPublisher.Publish, line 115, in publish
 Module ZPublisher.mapply, line 88, in mapply
 Module ZPublisher.Publish, line 41, in call_object
 Module OFS.DTMLMethod, line 144, in __call__
  - <DTMLMethod at /Playwiser/WUI/ViewPublicThread>
  - URL: http://new.playwiser.com/ViewPublicThread/manage_main
  - Physical Path: /Playwiser/WUI/ViewPublicThread
 Module DocumentTemplate.DT_String, line 476, in __call__
 Module DocumentTemplate.DT_Let, line 75, in render
 Module DocumentTemplate.DT_Util, line 196, in eval
  - __traceback_info__: document_id
 Module <string>, line 1, in <expression>
 Module Products.ExternalMethod.ExternalMethod, line 232, in __call__
  - __traceback_info__: (('ViewPublicThread',), {}, None)
 Module /apps/Zope-2.9.2/Extensions/playwiser-1.0.py, line 705, in
 Module <string>, line 1, in ?
 Module /apps/Zope-2.9.2/Extensions/playwiser-1.0.py, line 6212, in
 Module /apps/Zope-2.9.2/Extensions/playwiser-1.0.py, line 3228, in
 Module OFS.PropertyManager, line 320, in manage_changeProperties
 Module Shared.DC.Scripts.Bindings, line 311, in __call__
 Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
 Module App.special_dtml, line 175, in _exec
 Module Shared.DC.Scripts.Bindings, line 182, in __getattr__
 Module AccessControl.ImplPython, line 563, in validate
 Module AccessControl.ImplPython, line 461, in validate
 Module AccessControl.ImplPython, line 808, in raiseVerbose
Unauthorized: Your user account does not have the required permission.
Access to 'manage_page_header' of (BTreeFolder2 at
/Playwiser/PublicForums/0000000000/0000000000) denied. Your user account,
Anonymous User, exists at /acl_users. Access requires one of the following
roles: ['Manager']. Your roles in this context are ['Anonymous'].

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to