[Zope] ZSQL in Products

Dieter Maurer dieter@handshake.de
Thu, 8 Mar 2001 20:56:43 +0100 (CET)


Alexander Chelnokov writes:
 > A newbie question. Some ZSQLs work properly if the application is
 > created in a Zope tree. The same methods become unaccessible
 > (login/passw window appears) if a Product created from the code and
 > the application is an instance of the product. What permission and
 > where must be set? THX in advance.
Zope's permission machinery works only with "acquisition wrapped" objects.
Read

  URL:http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html

to learn more about acquisition wrappers.


In Zope objects are usually automatically wrapped during traversal
or attribute lookup.

In your own product, several thing can prevent wrapping:

 * in the constructur, the object being constructed is
   not yet wrapped

 * the class must be derived (directly or indirectly)
   from "ExtensionClass.Base".


Dieter