Hi all:
I'm using Zope 2.7. I have created a product that inherits from Folder.
The security assertions are::

security = ClassSecurityInfo()
security.declareObjectProtected('View management screens')

But I need to publish some ZPT methods public. I have declared them:

    security.declarePublic('my_stations')
    my_stations = PageTemplateFile('wsdl/my_stations.wsdl.zpt',
globals())
    my_stations.content_type = 'text/xml'

And 'wsdl/my_stations.wsdl.zpt' has only a reference to absolute_url in:
-------------------
...
 <port binding="tns:StationsBinding" name="port">
            <soap:address tal:attributes="location here/absolute_url"
location="http://localhost:8000/ccx/StationsService"/>
        </port>
...

The problem is trying to access to this method as anonymous user gives
me:
----------------------------------------------------------------
...
Module Products.PageTemplates.Expressions, line 189, in _eval
Module Products.PageTemplates.Expressions, line 145, in _eval
__traceback_info__: here

Module Products.PageTemplates.Expressions, line 323, in restrictedTraverse
__traceback_info__: {'path': [u'absolute_url'], 'TraversalRequestNameStack': []}

Module Shared.DC.Scripts.Bindings, line 176, in __getattr__
Module Shared.DC.Scripts.Bindings, line 182, in __you_lose</li>
Unauthorized: Not authorized to access binding: context (Also, an error 
occurred while attempting to render the standard error message.)
----------------------------------------------------------------
With other methods declared publics all works ok (like published via SOAP)... 
Can any one help me?

_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   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