From 337b66bd7a4282fc0147598e7b0e5b75bb2bb71b Mon Sep 17 00:00:00 2001 From: Kazuhiko Shiozaki <kazuhiko@nexedi.com> Date: Fri, 17 Apr 2009 09:26:16 +0000 Subject: [PATCH] * add security configurations git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26472 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../web_site_module.xml | 12 ++++ .../portal_categories/group/web.xml | 68 +++++++++++++++++++ .../Web%20Site%20Module.xml | 7 ++ .../Web%20Site.xml | 7 ++ .../WebSiteModule_resetWebZuite.xml | 18 +++-- bt5/erp5_web_ui_test/bt/change_log | 3 + bt5/erp5_web_ui_test/bt/revision | 2 +- .../bt/template_local_roles_list | 1 + bt5/erp5_web_ui_test/bt/template_path_list | 1 + .../bt/template_portal_type_roles_list | 2 + 10 files changed, 114 insertions(+), 7 deletions(-) create mode 100644 bt5/erp5_web_ui_test/LocalRolesTemplateItem/web_site_module.xml create mode 100644 bt5/erp5_web_ui_test/PathTemplateItem/portal_categories/group/web.xml create mode 100644 bt5/erp5_web_ui_test/PortalTypeRolesTemplateItem/Web%20Site%20Module.xml create mode 100644 bt5/erp5_web_ui_test/PortalTypeRolesTemplateItem/Web%20Site.xml diff --git a/bt5/erp5_web_ui_test/LocalRolesTemplateItem/web_site_module.xml b/bt5/erp5_web_ui_test/LocalRolesTemplateItem/web_site_module.xml new file mode 100644 index 0000000000..39077ae15e --- /dev/null +++ b/bt5/erp5_web_ui_test/LocalRolesTemplateItem/web_site_module.xml @@ -0,0 +1,12 @@ +<local_roles_item> + <local_roles> + <role id='ERP5TypeTestCase'> + <item>Owner</item> + </role> + <role id='web'> + <item>Assignor</item> + </role> + </local_roles> + <group_local_roles> + </group_local_roles> +</local_roles_item> \ No newline at end of file diff --git a/bt5/erp5_web_ui_test/PathTemplateItem/portal_categories/group/web.xml b/bt5/erp5_web_ui_test/PathTemplateItem/portal_categories/group/web.xml new file mode 100644 index 0000000000..f06080e49b --- /dev/null +++ b/bt5/erp5_web_ui_test/PathTemplateItem/portal_categories/group/web.xml @@ -0,0 +1,68 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="Category" module="Products.ERP5Type.Document.Category"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_Add_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Add_portal_folders_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Copy_or_Move_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>categories</string> </key> + <value> + <tuple> + <string>group/web</string> + </tuple> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>web</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Category</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Web</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_web_ui_test/PortalTypeRolesTemplateItem/Web%20Site%20Module.xml b/bt5/erp5_web_ui_test/PortalTypeRolesTemplateItem/Web%20Site%20Module.xml new file mode 100644 index 0000000000..71bea9a0ba --- /dev/null +++ b/bt5/erp5_web_ui_test/PortalTypeRolesTemplateItem/Web%20Site%20Module.xml @@ -0,0 +1,7 @@ +<type_roles> + <role id='Assignor'> + <property id='title'>Web Master</property> + <property id='priority'>10.0</property> + <multi_property id='category'>group/web</multi_property> + </role> +</type_roles> \ No newline at end of file diff --git a/bt5/erp5_web_ui_test/PortalTypeRolesTemplateItem/Web%20Site.xml b/bt5/erp5_web_ui_test/PortalTypeRolesTemplateItem/Web%20Site.xml new file mode 100644 index 0000000000..71bea9a0ba --- /dev/null +++ b/bt5/erp5_web_ui_test/PortalTypeRolesTemplateItem/Web%20Site.xml @@ -0,0 +1,7 @@ +<type_roles> + <role id='Assignor'> + <property id='title'>Web Master</property> + <property id='priority'>10.0</property> + <multi_property id='category'>group/web</multi_property> + </role> +</type_roles> \ No newline at end of file diff --git a/bt5/erp5_web_ui_test/SkinTemplateItem/portal_skins/erp5_web_ui_test/WebSiteModule_resetWebZuite.xml b/bt5/erp5_web_ui_test/SkinTemplateItem/portal_skins/erp5_web_ui_test/WebSiteModule_resetWebZuite.xml index 3e6e6b6d74..7896cc5ce9 100644 --- a/bt5/erp5_web_ui_test/SkinTemplateItem/portal_skins/erp5_web_ui_test/WebSiteModule_resetWebZuite.xml +++ b/bt5/erp5_web_ui_test/SkinTemplateItem/portal_skins/erp5_web_ui_test/WebSiteModule_resetWebZuite.xml @@ -67,15 +67,19 @@ if context.has_key(\'test_web_site_2\'):\n \n # Create new users\n if not context.person_module.has_key(\'test_webmaster\'):\n - context.person_module.newContent(id=\'test_webmaster\', portal_type=\'Person\')\n -\n -person = context.person_module.test_webmaster\n + person = context.person_module.newContent(id=\'test_webmaster\', portal_type=\'Person\')\n +else:\n + person = context.person_module.test_webmaster\n person.edit(first_name=\'Test\', last_name=\'Webmaster\',\n reference=\'test_webmaster\', password=\'test_webmaster\')\n person.setRole(\'internal\')\n -assignment = person.newContent(portal_type=\'Assignment\')\n -assignment.open()\n -\n +if not len(person.objectValues(portal_type=\'Assignment\')):\n + assignment = person.newContent(portal_type=\'Assignment\')\n + assignment.edit(group=\'web\',\n + start_date=DateTime(\'2000/01/01\'),\n + stop_date=DateTime(\'2990/12/31\'))\n + if assignment.getValidationState() != \'open\':\n + assignment.open()\n if person.getValidationState() != \'validated\':\n person.validate()\n \n @@ -127,7 +131,9 @@ return \'Reset Successfully.\'\n <string>_getattr_</string> <string>context</string> <string>person</string> + <string>len</string> <string>assignment</string> + <string>DateTime</string> </tuple> </value> </item> diff --git a/bt5/erp5_web_ui_test/bt/change_log b/bt5/erp5_web_ui_test/bt/change_log index b9a8c1dfa2..2db801d928 100644 --- a/bt5/erp5_web_ui_test/bt/change_log +++ b/bt5/erp5_web_ui_test/bt/change_log @@ -1,2 +1,5 @@ +2009-04-17 Kazuhiko +* add security configurations + 2007-02-13 jps Initial version \ No newline at end of file diff --git a/bt5/erp5_web_ui_test/bt/revision b/bt5/erp5_web_ui_test/bt/revision index 19c7bdba7b..8e2afd3427 100644 --- a/bt5/erp5_web_ui_test/bt/revision +++ b/bt5/erp5_web_ui_test/bt/revision @@ -1 +1 @@ -16 \ No newline at end of file +17 \ No newline at end of file diff --git a/bt5/erp5_web_ui_test/bt/template_local_roles_list b/bt5/erp5_web_ui_test/bt/template_local_roles_list index e69de29bb2..c57239aea1 100644 --- a/bt5/erp5_web_ui_test/bt/template_local_roles_list +++ b/bt5/erp5_web_ui_test/bt/template_local_roles_list @@ -0,0 +1 @@ +web_site_module \ No newline at end of file diff --git a/bt5/erp5_web_ui_test/bt/template_path_list b/bt5/erp5_web_ui_test/bt/template_path_list index 1cd3022d4e..c2d29f7bb2 100644 --- a/bt5/erp5_web_ui_test/bt/template_path_list +++ b/bt5/erp5_web_ui_test/bt/template_path_list @@ -1,2 +1,3 @@ +portal_categories/group/web portal_tests/erp5_web_zuite portal_tests/erp5_web_zuite/** \ No newline at end of file diff --git a/bt5/erp5_web_ui_test/bt/template_portal_type_roles_list b/bt5/erp5_web_ui_test/bt/template_portal_type_roles_list index e69de29bb2..e697ceb117 100644 --- a/bt5/erp5_web_ui_test/bt/template_portal_type_roles_list +++ b/bt5/erp5_web_ui_test/bt/template_portal_type_roles_list @@ -0,0 +1,2 @@ +Web Site +Web Site Module \ No newline at end of file -- 2.30.9