[CMF-checkins] CVS: CMF/CMFSetup - rolemap.py:1.4

Tres Seaver tseaver at zope.com
Tue May 18 18:33:26 EDT 2004


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

Modified Files:
	rolemap.py 
Log Message:
 - Document registration via examples.


=== CMF/CMFSetup/rolemap.py 1.3 => 1.4 ===
--- CMF/CMFSetup/rolemap.py:1.3	Tue May 18 18:14:03 2004
+++ CMF/CMFSetup/rolemap.py	Tue May 18 18:33:25 2004
@@ -160,6 +160,27 @@
     """ Export roles / permission map as an XML file
 
     o 'context' must implement IImportContext.
+
+    o Register via Python:
+
+      registry = site.portal_setup.setup_steps
+      registry.registerStep( 'importRoleMap'
+                           , '20040518-01'
+                           , Products.CMFSetup.rolemap.importRoleMap
+                           , ()
+                           , 'Role / Permission import'
+                           , 'Import additional roles, and map '
+                           'roles to permissions'
+                           )
+
+    o Register via XML:
+ 
+      <setup-step id="importRoleMap"
+                  version="20040518-01"
+                  handler="Products.CMFSetup.rolemap.importRoleMap"
+                  title="Role / Permission import"
+      >Import additional roles, and map roles to permissions.</setup-step>
+
     """
     site = context.getSite()
     text = context.readDatafile( FILENAME )
@@ -177,6 +198,27 @@
     """ Export roles / permission map as an XML file
 
     o 'context' must implement IExportContext.
+
+    o Register via Python:
+
+      registry = site.portal_setup.export_steps
+      registry.registerStep( 'exportRoleMap'
+                           , '20040518-01'
+                           , Products.CMFSetup.rolemap.exportRoleMap
+                           , ()
+                           , 'Role / Permission export'
+                           , 'Export additional roles, and '
+                             'role / permission map '
+                           )
+
+    o Register via XML:
+ 
+      <export-script id="exportRoleMap"
+                     version="20040518-01"
+                     handler="Products.CMFSetup.rolemap.exportRoleMap"
+                     title="Role / Permission export"
+      >Export additional roles, and role / permission map.</export-script>
+
     """
     rc = RolemapConfigurator( site ).__of__( site )
     text = rc.generateXML()




More information about the CMF-checkins mailing list