diff --git a/bt5/erp5_scalability_data/PathTemplateItem/portal_skins/custom/init_scalability.xml b/bt5/erp5_scalability_data/PathTemplateItem/portal_skins/custom/init_scalability.xml index 364d513c0e8dc93029be917d588abac20e64f3fe..bc1b9a0ed4b3beeff950e8fdc29cc9cd6d20b0ad 100644 --- a/bt5/erp5_scalability_data/PathTemplateItem/portal_skins/custom/init_scalability.xml +++ b/bt5/erp5_scalability_data/PathTemplateItem/portal_skins/custom/init_scalability.xml @@ -52,6 +52,7 @@ <key> <string>_body</string> </key> <value> <string>portal = context.getPortalObject()\n \n +\n # Update roles\n portal_type = portal.searchFolder(title=\'portal_types\')[0]\n portal_type.searchFolder(title=\'Person\')[0].updateRoleMapping()\n @@ -73,6 +74,13 @@ for i in xrange(0,50):\n assignment = new_user.objectValues(portal_type=\'Assignment\')[0]\n assignment.open()\n return 1\n +\n +# Update roles\n +portal_type = portal.searchFolder(title=\'portal_types\')[0]\n +portal_type.searchFolder(title=\'Person\')[0].updateRoleMapping()\n +portal_type.searchFolder(title=\'Product\')[0].updateRoleMapping()\n +portal_type.searchFolder(title=\'Organisation\')[0].updateRoleMapping()\n +portal_type.searchFolder(title=\'Sale Trade Condition\')[0].updateRoleMapping()\n </string> </value> </item> <item> diff --git a/bt5/erp5_scalability_data/PathTemplateItem/portal_skins/custom/update_roles_scalability.xml b/bt5/erp5_scalability_data/PathTemplateItem/portal_skins/custom/update_roles_scalability.xml new file mode 100644 index 0000000000000000000000000000000000000000..68c2a55b87b8557f9e9df73cb348199e87d59aa4 --- /dev/null +++ b/bt5/erp5_scalability_data/PathTemplateItem/portal_skins/custom/update_roles_scalability.xml @@ -0,0 +1,73 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_body</string> </key> + <value> <string>portal = context.getPortalObject()\n +\n +# Update roles of Product, Organisation and Sale Trade Condition\n +portal_type = portal.searchFolder(title=\'portal_types\')[0]\n +portal_type.searchFolder(title=\'Product\')[0].updateRoleMapping()\n +portal_type.searchFolder(title=\'Organisation\')[0].updateRoleMapping()\n +portal_type.searchFolder(title=\'Sale Trade Condition\')[0].updateRoleMapping()\n +</string> </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>update_roles_scalability</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_scalability_data/bt/revision b/bt5/erp5_scalability_data/bt/revision index 9d607966b721abde8931ddd052181fae905db503..3cacc0b93c9c9c03a72da624ca28a09ba5c1336f 100644 --- a/bt5/erp5_scalability_data/bt/revision +++ b/bt5/erp5_scalability_data/bt/revision @@ -1 +1 @@ -11 \ No newline at end of file +12 \ No newline at end of file diff --git a/bt5/erp5_scalability_data/bt/template_keep_path_list b/bt5/erp5_scalability_data/bt/template_keep_path_list index 1757af332f23bbec26e3060eae042b2778e8ffde..b0b58f2a958d2f3ccecae544cf4b77faec0a4f82 100644 --- a/bt5/erp5_scalability_data/bt/template_keep_path_list +++ b/bt5/erp5_scalability_data/bt/template_keep_path_list @@ -1,4 +1,5 @@ portal_skins/custom/init_scalability +portal_skins/custom/update_roles_scalability organisation_module/idexen organisation_module/idexen/** person_module/scalability_user diff --git a/bt5/erp5_scalability_data/bt/template_path_list b/bt5/erp5_scalability_data/bt/template_path_list index 173ecb71071e1f5dfb0d1e04bf01c44740294d9b..2a9c47bda8a39a682508e718bff65f2e868e8f06 100644 --- a/bt5/erp5_scalability_data/bt/template_path_list +++ b/bt5/erp5_scalability_data/bt/template_path_list @@ -9,6 +9,7 @@ person_module/john_rock/* person_module/scalability_user person_module/scalability_user/* portal_skins/custom/init_scalability +portal_skins/custom/update_roles_scalability product_module/blue_led product_module/blue_led/* product_module/green_led