[Zope-dev] (no subject)

Dieter Maurer dieter@handshake.de
Wed, 4 Oct 2000 13:45:42 +0200 (CEST)


ralf.herold@charite.de writes:
 > using LocalFS 0.95 war fine until trying to upgrade to Zope 2.2.2. Both
 > freshly installed, the following snippet raises the error: "Unauthorized",
 > "You are not authorized to access read.":
 > 
 > <dtml-var standard_html_header>
 > <dtml-var "frei['analog.html'].read()">
 > <dtml-var standard_html_footer>
In earlier Zope versions, a method without a permission meant
"can be used freely". Now, it means "cannot be used via DTML/URL".

Thus, you must provide a permission for "read".
Unfortunately, "read" is not a method of "LocalFS" but from
the Zope objects wrapped around the files.
You, probably, will not want to change the respective Zope
sources.

The quickest solution for you would be an external method
that gets the file, performs the "read" and returns the result.

Alternatively, you may subclass the Zope object classes,
provide a permission for "read" and use them in
"LocalFS._create_XXXX".


Dieter