[Checkins] SVN: z3ext.layout/trunk/ Pass permission to class required attributes

Nikolay Kim fafhrd at datacom.kz
Thu Jan 22 14:08:02 EST 2009


Log message for revision 94945:
  Pass permission to class required attributes

Changed:
  U   z3ext.layout/trunk/CHANGES.txt
  U   z3ext.layout/trunk/buildout.cfg
  D   z3ext.layout/trunk/buildout34.cfg
  U   z3ext.layout/trunk/src/z3ext/layout/zcml.py
  D   z3ext.layout/trunk/tests.cfg

-=-
Modified: z3ext.layout/trunk/CHANGES.txt
===================================================================
--- z3ext.layout/trunk/CHANGES.txt	2009-01-22 19:05:08 UTC (rev 94944)
+++ z3ext.layout/trunk/CHANGES.txt	2009-01-22 19:08:01 UTC (rev 94945)
@@ -2,6 +2,12 @@
 CHANGES
 =======
 
+2.0.4 (2009-01-22)
+------------------
+
+- Pass permission to class required attributes
+
+
 2.0.3 (2009-01-20)
 ------------------
 

Modified: z3ext.layout/trunk/buildout.cfg
===================================================================
--- z3ext.layout/trunk/buildout.cfg	2009-01-22 19:05:08 UTC (rev 94944)
+++ z3ext.layout/trunk/buildout.cfg	2009-01-22 19:08:01 UTC (rev 94945)
@@ -1,4 +1,18 @@
 [buildout]
 develop = .
 parts = test coverage-test coverage-report
-extends = tests.cfg
+
+[test]
+recipe = zc.recipe.testrunner
+eggs = z3ext.layout [test]
+
+[coverage-test]
+recipe = zc.recipe.testrunner
+eggs = z3ext.layout [test]
+defaults = ['--coverage', '../../coverage']
+
+[coverage-report]
+recipe = zc.recipe.egg
+eggs = z3c.coverage
+scripts = coverage=coverage-report
+arguments = ('coverage', 'coverage/report')

Deleted: z3ext.layout/trunk/buildout34.cfg
===================================================================
--- z3ext.layout/trunk/buildout34.cfg	2009-01-22 19:05:08 UTC (rev 94944)
+++ z3ext.layout/trunk/buildout34.cfg	2009-01-22 19:08:01 UTC (rev 94945)
@@ -1,9 +0,0 @@
-[buildout]
-develop = .
-parts = test coverage-test coverage-report
-versions = versions
-extends = tests.cfg
-	  http://download.zope.org/zope3.4/versions-3.4.0c7.cfg
-
-[versions]
-z3c.zrtresource = 1.1.0

Modified: z3ext.layout/trunk/src/z3ext/layout/zcml.py
===================================================================
--- z3ext.layout/trunk/src/z3ext/layout/zcml.py	2009-01-22 19:05:08 UTC (rev 94944)
+++ z3ext.layout/trunk/src/z3ext/layout/zcml.py	2009-01-22 19:08:01 UTC (rev 94945)
@@ -313,10 +313,6 @@
     # Security map dictionary
     required = {}
 
-    # Get the permission; mainly to correctly handle CheckerPublic.
-    if permission == 'zope.Public':
-        permission = CheckerPublic
-
     # Make sure that the template exists
     if template:
         template = os.path.abspath(str(_context.path(template)))
@@ -347,6 +343,10 @@
         if iface is not None:
             provides.append(iface)
 
+    kwargs['type'] = type
+    kwargs['name'] = name
+    kwargs['permission'] = permission
+
     # convert kwargs
     for iface in provides:
         for fname, field in schema.getFields(iface).items():
@@ -372,6 +372,10 @@
         if not inProvides:
             provides.append(IPagelet)
 
+    # Handle CheckerPublic
+    if permission == 'zope.Public':
+        permission = CheckerPublic
+
     # prepare allowed interfaces and attributes
     allowed_interface.extend(provides)
     allowed_interface.append(IBrowserPage)

Deleted: z3ext.layout/trunk/tests.cfg
===================================================================
--- z3ext.layout/trunk/tests.cfg	2009-01-22 19:05:08 UTC (rev 94944)
+++ z3ext.layout/trunk/tests.cfg	2009-01-22 19:08:01 UTC (rev 94945)
@@ -1,14 +0,0 @@
-[test]
-recipe = zc.recipe.testrunner
-eggs = z3ext.layout [test]
-
-[coverage-test]
-recipe = zc.recipe.testrunner
-eggs = z3ext.layout [test]
-defaults = ['--coverage', '../../coverage']
-
-[coverage-report]
-recipe = zc.recipe.egg
-eggs = z3c.coverage
-scripts = coverage=coverage-report
-arguments = ('coverage', 'coverage/report')



More information about the Checkins mailing list