[CMF-checkins] CVS: CMF/CMFSetup - typeinfo.py:1.5

Tres Seaver tseaver at zope.com
Sun May 30 16:01:26 EDT 2004


Update of /cvs-repository/CMF/CMFSetup
In directory cvs.zope.org:/tmp/cvs-serv13427

Modified Files:
	typeinfo.py 
Log Message:


  - typeinfo.py:

    o Make 'importTypesTool' actually work.

    o Fux big in translating permissions from XML to type info actions.

  - profiles/default/*:

    o Snapshot current dump.



=== CMF/CMFSetup/typeinfo.py 1.4 => 1.5 ===
--- CMF/CMFSetup/typeinfo.py:1.4	Sun May 30 15:05:21 2004
+++ CMF/CMFSetup/typeinfo.py	Sun May 30 16:00:55 2004
@@ -42,9 +42,8 @@
     configurator = TypeInfoConfigurator( site )
     text = context.readDataFile( _TOOL_FILENAME )
 
-    for type_id in configurator.parseToolXML( text ):
+    for type_id, type_filename in configurator.parseToolXML( text ):
 
-        type_filename = _getTypeFilename( type_id )
         text = context.readDataFile( type_filename )
         configurator.parseTypeXML( text )
 
@@ -162,7 +161,7 @@
 
             type_info = klass_info[ 'class' ]( **info )
 
-            tool._setObject( info[ 'id' ], type_info )
+            tool._setObject( str( info[ 'id' ] ), type_info )
 
     #
     #   Helper methods
@@ -338,11 +337,14 @@
         elif name == 'action':
 
             t_info = self._info_list[ -1 ]
+            permissions = tuple( _es( 'permissions' ).split( ',' ) )
+
             a_info = { 'id'             : _es( 'action_id' )
                      , 'title'          : _es( 'title' )
+                     , 'name'           : _es( 'title' )
                      , 'action'         : _es( 'action_expr' )
                      , 'condition'      : _es( 'condition' )
-                     , 'permissions'    : _es( 'permissions' ).split( ',' )
+                     , 'permissions'    : permissions
                      , 'category'       : _es( 'category' )
                      , 'visible'        : _eb( 'visible' )
                      }




More information about the CMF-checkins mailing list