Commit 10cbda51 authored by Gabriel Monnerat's avatar Gabriel Monnerat

update portal type roles

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45272 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 30263b5b
...@@ -81,6 +81,10 @@ bt5 = portal.portal_catalog.getResultValue(portal_type="Business Template",\n ...@@ -81,6 +81,10 @@ bt5 = portal.portal_catalog.getResultValue(portal_type="Business Template",\n
if bt5 is not None:\n if bt5 is not None:\n
for portal_type in bt5.getTemplatePortalTypeRolesList():\n for portal_type in bt5.getTemplatePortalTypeRolesList():\n
module_list = portal.contentValues(filter=dict(portal_type=portal_type))\n module_list = portal.contentValues(filter=dict(portal_type=portal_type))\n
portal_type_object = portal.portal_catalog.getResultValue(portal_type="Base Type",\n
id=portal_type)\n
portal_type_object.updateRoleMapping()\n
context.log("Updated Role Mappings for: %s " % (portal_type_object.getId()))\n
for module in module_list:\n for module in module_list:\n
module.updateLocalRolesOnSecurityGroups()\n module.updateLocalRolesOnSecurityGroups()\n
context.log("Updated Role Mappings for: %s(%s) " % (module.getTitle(), module.getPortalType()))\n context.log("Updated Role Mappings for: %s(%s) " % (module.getTitle(), module.getPortalType()))\n
......
40 41
\ No newline at end of file \ No newline at end of file
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