[Erp5-report] r43800 kazuhiko - /erp5/trunk/products/ERP5Security/tests/testERP5Security.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Feb 28 13:05:31 CET 2011


Author: kazuhiko
Date: Mon Feb 28 13:05:30 2011
New Revision: 43800

URL: http://svn.erp5.org?rev=43800&view=rev
Log:
provide own security configuration script, because erp5_dms business template installs another one.

Modified:
    erp5/trunk/products/ERP5Security/tests/testERP5Security.py

Modified: erp5/trunk/products/ERP5Security/tests/testERP5Security.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Security/tests/testERP5Security.py?rev=43800&r1=43799&r2=43800&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Security/tests/testERP5Security.py [utf8] (original)
+++ erp5/trunk/products/ERP5Security/tests/testERP5Security.py [utf8] Mon Feb 28 13:05:30 2011
@@ -34,6 +34,7 @@ import unittest
 import transaction
 
 from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
+from Products.ERP5Type.tests.utils import createZODBPythonScript
 from AccessControl.SecurityManagement import newSecurityManager
 from AccessControl.SecurityManagement import getSecurityManager
 from zLOG import LOG
@@ -420,6 +421,16 @@ class TestLocalRoleManagement(ERP5TypeTe
     """Called after setup completed.
     """
     self.portal = self.getPortal()
+    # create a security configuration script
+    skin_folder = self.portal.portal_skins.custom
+    if 'ERP5Type_getSecurityCategoryMapping' not in skin_folder.objectIds():
+      createZODBPythonScript(
+        skin_folder, 'ERP5Type_getSecurityCategoryMapping', '',
+        """return ((
+          'ERP5Type_getSecurityCategoryFromAssignment',
+          context.getPortalObject().getPortalAssignmentBaseCategoryList()
+          ),)
+        """)
     # configure group, site, function categories
     for bc in ['group', 'site', 'function']:
       base_cat = self.getCategoryTool()[bc]



More information about the Erp5-report mailing list