[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zope
Subject:    [Zope] Zope 2.2.0b3: can't call db_connection.query()
From:       "Cary O'Brien" <cobrien () Radix ! Net>
Date:       2000-06-30 17:49:26
[Download RAW message or body]


With Zope 2.2.0b3, I can't seem to call the query() method
of a database connection any more.

For example, with a PostgreSQL connection called dbconn, calling

<dtml-with dbconn>
<dtml-var "query('select count(*) from pg_class')">
</dtml-with>

Works fine with 2.1.6, but with 2.2.0b3, I get...


            Zope Error

            Zope has encountered an error while publishing this resource. 

            Unauthorized
...

 File /usr2/local/zope/Zope-2.2.0b3-src/lib/python/DocumentTemplate/DT_With.py, line \
146, in render  (Object: dbconn)
 File /usr2/local/zope/Zope-2.2.0b3-src/lib/python/DocumentTemplate/DT_Util.py, line \
327, in eval  (Object: query('select count(*) from pg_class'))
     (Info: query)
 File /usr2/local/zope/Zope-2.2.0b3-src/lib/python/OFS/DTMLMethod.py, line 189, in \
validate  (Object: test1)
 File /usr2/local/zope/Zope-2.2.0b3-src/lib/python/AccessControl/SecurityManager.py, \
line 139, in validate  File \
/usr2/local/zope/Zope-2.2.0b3-src/lib/python/AccessControl/ZopeSecurityPolicy.py, \
line 158, in validate  Unauthorized: query

Any ideas?

There doesn't seem to be any permission to set.

What I would like to do is add some functions to the PostgreSQL DA
so I can view table names and column names.

-- cary


_______________________________________________
Zope maillist  -  Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic