Commit 7f3ff26e authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

provide own security configuration script, because erp5_dms business template installs another one.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43800 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 40b9da83
...@@ -34,6 +34,7 @@ import unittest ...@@ -34,6 +34,7 @@ import unittest
import transaction import transaction
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.utils import createZODBPythonScript
from AccessControl.SecurityManagement import newSecurityManager from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import getSecurityManager from AccessControl.SecurityManagement import getSecurityManager
from zLOG import LOG from zLOG import LOG
...@@ -420,6 +421,16 @@ class TestLocalRoleManagement(ERP5TypeTestCase): ...@@ -420,6 +421,16 @@ class TestLocalRoleManagement(ERP5TypeTestCase):
"""Called after setup completed. """Called after setup completed.
""" """
self.portal = self.getPortal() 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 # configure group, site, function categories
for bc in ['group', 'site', 'function']: for bc in ['group', 'site', 'function']:
base_cat = self.getCategoryTool()[bc] base_cat = self.getCategoryTool()[bc]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment