Dario Lopez-Kästen wrote:
Greetings,

for a product I am writing, i need to experiment with inhibiting URL-traversal to the methods and subobjects of it. I still wnat the methods and objects to be available via direct call, for instance:

from a script or template:
container.my_product_instance.some_method(...)

but not

http://some/url/my_product_instance/some_method?...


In effect I am hiding that part of the zodb for external access-

Also, can such a behaviour be imposed on templates (they being methods really) and Script(Python)s?


Have your methods accept a REQUEST=None optional argument, and if it's not None then you were called through an URL. In that case you can redirect or raise a Unauthorized or NotFound or whatever.

Florent

--
Florent Guillaume, Nuxeo (Paris, France)   Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Reply via email to