Commit fdafbf6c authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

2011-02-10 Kazuhiko

* support 'update_security_workflow_id_list' in upgrade signature.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43256 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 40572dfc
......@@ -166,6 +166,12 @@ WORKFLOW_CHAIN_DICT = None\n
# Once this document changes this script should be immediately \n
# updated to include or fix any security change.\n
\n
# Workflows whose security should be updated.\n
# To upgrade entire security use context.portal_workflow.objectIds()\n
# or [] to update None.\n
\n
UPDATE_SECURITY_WORKFLOW_ID_LIST = []\n
\n
# Portal Types to be updated using updateMappingDefinition.\n
# To upgrade entire security use context.portal_types.objectIds()\n
# or [] to update None.\n
......@@ -350,6 +356,8 @@ signature_dict = {\n
, \'finalize_upgrade_script_list\': FINALIZE_ALARM_SCRIPT\n
# Provides a dict with expected catalog filter expressions\n
, \'catalog_filter_dict\': CATALOG_FILTER_DICT\n
# Provides a list of workflow ids whose security should be updated.\n
, \'update_security_workflow_id_list\': UPDATE_SECURITY_WORKFLOW_ID_LIST\n
# Provides a list of portal types to had rules updated.\n
, \'update_role_portal_type_list\': UPDATE_ROLE_PORTAL_TYPE_LIST\n
# Provide a list of Property Sheet Expected into a portal type list\n
......
......@@ -67,8 +67,19 @@ if not upgrade:\n
return message_list\n
\n
portal = context.getPortalObject()\n
portal_workflow = portal.portal_workflow\n
workflow_id_list = portal.ERP5Site_getUpgraderSignature(\'update_security_workflow_id_list\', [])\n
for workflow_id in workflow_id_list:\n
workflow = getattr(portal_workflow, workflow_id, None)\n
if workflow is not None:\n
workflow.updateRoleMappings()\n
\n
message_list.append(\n
"Update workflow security for: \\n\\t%s" % \\\n
(\'\\n\\t\'.join(workflow_id_list)))\n
\n
types_tool = portal.portal_types\n
portal_type_list = portal.ERP5Site_getUpgraderSignature("update_role_portal_type_list")\n
portal_type_list = portal.ERP5Site_getUpgraderSignature(\'update_role_portal_type_list\', [])\n
\n
for pt in portal_type_list:\n
portal_type_document = types_tool.getTypeInfo(pt)\n
......
2011-02-10 Kazuhiko
* support 'update_security_workflow_id_list' in upgrade signature.
2011-02-09 Kazuhiko
* compare revisions as int not as str in ERP5Site_upgradeBusinessTemplateList.
......
575
\ No newline at end of file
576
\ 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