[Zope] You are not allowed to access ...., even allowing ?!

Bernhard Kahlbacher bernhard.kahlbacher at aon.at
Wed Sep 3 14:40:59 EDT 2003


Hi,

I'm writing a Product called "Groupware" which shoud provide minimal
Groupware Function.
As a Database System I decided to use PostgresQL and my DB-Connection
Class (writen in python using psycopg) allready works perfectly (outside
Zope).
But now I'm not making any progress since serveral days.

After I added the Groupware Product in the ZMI, I added a "Python
Script" and just added one line to import my DB-Connection Class
(Filename DB.py, the class itself I name "database") in the python
script:
-----
from Products.Groupware.DB import database  
----

Then the browser starts a HTTP-Authentification which results in 

Error Type: Unauthorized
Error Value: You are not allowed to access Groupware in this context

In my __init__.py I inserted the following lines to allow an import 

import Groupware
from ImageFile import ImageFile

from Products.PythonScripts.Utility import allow_module, allow_class
from AccessControl import ModuleSecurityInfo, ClassSecurityInfo
from Globals import InitializeClass

from DB import database
allow_class (database)

...
...

The DB_Connection Class works ouside Zope what on earth can I do to make
it working inside zope?

Any help would be greatly appreciated.

Bernhard Kahlbacher





More information about the Zope mailing list