[Zope3-checkins] CVS: Zope3/src/zope/app/rdb - __init__.py:1.9 configure.zcml:1.4

runyaga runyaga@thisbox.com
Sat, 7 Jun 2003 15:01:13 -0400


Update of /cvs-repository/Zope3/src/zope/app/rdb
In directory cvs.zope.org:/tmp/cvs-serv13211

Modified Files:
	__init__.py configure.zcml 
Log Message:
added security declarations for zope.app.rdb.ResultSet also added 
__bases__ to the Checker for GeneratedRowClass so we can return
ResultSet back to ZPT and iterate over them.


=== Zope3/src/zope/app/rdb/__init__.py 1.8 => 1.9 ===
--- Zope3/src/zope/app/rdb/__init__.py:1.8	Wed Jun  4 06:46:36 2003
+++ Zope3/src/zope/app/rdb/__init__.py	Sat Jun  7 15:01:12 2003
@@ -378,7 +378,13 @@
     """Creates a Row object"""
     klass_namespace = {}
 
-    klass_namespace['__Security_checker__'] = checker.NamesChecker(columns)
+    #XXX +['__bases__'] is described below
+    #
+    #<SteveA> the class is supposed to provide the attributes for the instancesa
+    #<SteveA> but, either the checker selection thing needs to ignore it for types
+    #<SteveA> (which is ropey when you're working with metatypes)
+    #<SteveA> or, it really should be a descriptor that doesn't fuck with the value on the class
+    klass_namespace['__Security_checker__'] = checker.NamesChecker(columns+['__bases__'])
     klass_namespace['__slots__'] = tuple(columns)
 
     return type('GeneratedRowClass', (Row,), klass_namespace)


=== Zope3/src/zope/app/rdb/configure.zcml 1.3 => 1.4 ===
--- Zope3/src/zope/app/rdb/configure.zcml:1.3	Tue Apr 22 18:17:40 2003
+++ Zope3/src/zope/app/rdb/configure.zcml	Sat Jun  7 15:01:12 2003
@@ -15,4 +15,11 @@
       />
 </content>
 
+<content class="zope.app.rdb.ResultSet">
+  <require permission="zope.View"
+           attributes="__getitem__ __getslice__ __len__
+                       __iter__ __contains__ index count __str__
+                       __add__ __radd__" />
+</content>
+                                            
 </zopeConfigure>