Commit 6e7d6a25 authored by Bartek Górny's avatar Bartek Górny

a big cleanup

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9212 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f062347a
......@@ -44,10 +44,6 @@
<key> <string>id</string> </key>
<value> <string>list_ui</string> </value>
</item>
<item>
<key> <string>optional</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
......
......@@ -44,10 +44,6 @@
<key> <string>id</string> </key>
<value> <string>sort_on</string> </value>
</item>
<item>
<key> <string>optional</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
......
......@@ -44,10 +44,6 @@
<key> <string>id</string> </key>
<value> <string>view</string> </value>
</item>
<item>
<key> <string>optional</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
......
......@@ -44,10 +44,6 @@
<key> <string>id</string> </key>
<value> <string>history</string> </value>
</item>
<item>
<key> <string>optional</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
......
......@@ -44,10 +44,6 @@
<key> <string>id</string> </key>
<value> <string>metadata</string> </value>
</item>
<item>
<key> <string>optional</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
......
......@@ -44,10 +44,6 @@
<key> <string>id</string> </key>
<value> <string>print</string> </value>
</item>
<item>
<key> <string>optional</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
......
......@@ -44,10 +44,6 @@
<key> <string>id</string> </key>
<value> <string>view</string> </value>
</item>
<item>
<key> <string>optional</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
......
......@@ -45,7 +45,7 @@
<key> <string>_keys</string> </key>
<value>
<list>
<string>uid</string>
<string>uid</string>
</list>
</value>
</item>
......
......@@ -57,9 +57,9 @@
<key> <string>_keys</string> </key>
<value>
<list>
<string>uid</string>
<string>getUrlString</string>
<string>getPortalType</string>
<string>uid</string>
<string>getUrlString</string>
<string>getPortalType</string>
</list>
</value>
</item>
......
<catalog_method>
<item key="sql_clear_catalog" type="int">
<value>1</value>
</item>
</catalog_method>
\ No newline at end of file
......@@ -56,7 +56,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>successor</string> </value>
<value> <string>successor</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
......
......@@ -59,7 +59,7 @@ def asSecurityGroupId(self,**kw):
# Return a list of users or a single group
if user_list:
self.log('user_list',user_list)
#self.log('user_list',user_list)
return user_list
self.log('code_list',code_list)
#self.log('code_list',code_list)
return '_'.join(code_list)
......@@ -82,5 +82,5 @@ def asSecurityGroupIdList(self, category_order=None, **kw):
#LOG('asSecurityGroupIdList, result',0,['_'.join(x) for x in getCombinationList(code_list) if len(x)])
#return ['_'.join(x) for x in getCombinationList(code_list) if len(x)]
#LOG('asSecurityGroupIdList', 0, 'return full_code_list = %s' %(full_code_list,))
self.log('full_code_list',full_code_list)
#self.log('full_code_list',full_code_list)
return full_code_list
......@@ -3,7 +3,7 @@
<property id='title'>Team Reviewer</property>
<property id='description'>The head of the team who is in charge of reviewing documents published by his team. He is granted special rights on documents produced by his team.</property>
<property id='condition'>python: not object.getSourceProject()</property>
<property id='priority'>10</property>
<property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property>
<multi_property id='category'>function/publication/reviewer</multi_property>
<multi_property id='base_category'>group</multi_property>
......@@ -13,25 +13,23 @@
<property id='title'>Project Assignees</property>
<property id='description'>In a project collaborative document, all project members have a right to access and modify a document before release or publication.</property>
<property id='condition'>python:object.getSourceProject() and object.isMemberOf('classification/collaborative/project')</property>
<property id='priority'>10</property>
<property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property>
<multi_property id='category'></multi_property>
<multi_property id='base_category'>source_project</multi_property>
</role>
<role id='Associate'>
<property id='title'>Project Associates</property>
<property id='description'>In a project document, all project members have a right to access the document before it is released or published.</property>
<property id='condition'>python: object.getSourceProject()</property>
<property id='priority'>10</property>
<property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property>
<multi_property id='category'></multi_property>
<multi_property id='base_category'>source_project</multi_property>
</role>
<role id='Assignor'>
<property id='title'>Project Reviewer</property>
<property id='description'>The head of the project who is in charge of reviewing documents produced by the project before release or publication.</property>
<property id='condition'>python: object.getSourceProject()</property>
<property id='priority'>10</property>
<property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property>
<multi_property id='category'>function/project/director</multi_property>
<multi_property id='base_category'>source_project</multi_property>
......@@ -40,9 +38,8 @@
<property id='title'>Team Associates</property>
<property id='description'>All team members have a right to access non restricted documents before their release or publication.</property>
<property id='condition'>python:not object.isMemberOf('classification/personnal/restricted')</property>
<property id='priority'>10</property>
<property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property>
<multi_property id='category'></multi_property>
<multi_property id='base_category'>group</multi_property>
<multi_property id='base_category'>function</multi_property>
<multi_property id='base_category'>site</multi_property>
......@@ -50,7 +47,7 @@
<role id='Auditor'>
<property id='title'>Management</property>
<property id='description'>Management has to access anydocument in the system.</property>
<property id='priority'>10</property>
<property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property>
<multi_property id='category'>function/hq</multi_property>
</role>
......
......@@ -3,7 +3,7 @@
<property id='title'>Team Reviewer</property>
<property id='description'>The head of the team who is in charge of reviewing documents published by his team. He is granted special rights on documents produced by his team.</property>
<property id='condition'>python:not object.getSourceProject()</property>
<property id='priority'>10</property>
<property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property>
<multi_property id='category'>function/publication/reviewer</multi_property>
<multi_property id='base_category'>group</multi_property>
......@@ -13,25 +13,23 @@
<property id='title'>Project Assignees</property>
<property id='description'>In a project collaborative document, all project members have a right to access and modify a document before release or publication.</property>
<property id='condition'>python:object.getSourceProject() and object.isMemberOf('classification/collaborative/project')</property>
<property id='priority'>10</property>
<property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property>
<multi_property id='category'></multi_property>
<multi_property id='base_category'>source_project</multi_property>
</role>
<role id='Associate'>
<property id='title'>Project Associates</property>
<property id='description'>In a project document, all project members have a right to access the document before it is released or published.</property>
<property id='condition'>python:object.getSourceProject()</property>
<property id='priority'>10</property>
<property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property>
<multi_property id='category'></multi_property>
<multi_property id='base_category'>source_project</multi_property>
</role>
<role id='Assignor'>
<property id='title'>Project Reviewer</property>
<property id='description'>The head of the project who is in charge of reviewing documents produced by the project before release or publication.</property>
<property id='condition'>python:object.getSourceProject()</property>
<property id='priority'>10</property>
<property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property>
<multi_property id='category'>function/project/director</multi_property>
<multi_property id='base_category'>source_project</multi_property>
......@@ -40,9 +38,8 @@
<property id='title'>Team Associates</property>
<property id='description'>All team members have a right to access non restricted documents before their release or publication.</property>
<property id='condition'>python:not object.isMemberOf('classification/personnal/restricted')</property>
<property id='priority'>10</property>
<property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property>
<multi_property id='category'></multi_property>
<multi_property id='base_category'>group</multi_property>
<multi_property id='base_category'>function</multi_property>
<multi_property id='base_category'>site</multi_property>
......@@ -50,7 +47,7 @@
<role id='Auditor'>
<property id='title'>Management</property>
<property id='description'>Management has to access anydocument in the system.</property>
<property id='priority'>10</property>
<property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property>
<multi_property id='category'>function/hq</multi_property>
</role>
......
......@@ -3,7 +3,7 @@
<property id='title'>Team Reviewer</property>
<property id='description'>The head of the team who is in charge of reviewing documents published by his team. He is granted special rights on documents produced by his team.</property>
<property id='condition'>python: not object.getSourceProject()</property>
<property id='priority'>10</property>
<property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property>
<multi_property id='category'>function/publication/reviewer</multi_property>
<multi_property id='base_category'>group</multi_property>
......@@ -13,25 +13,23 @@
<property id='title'>Project Assignees</property>
<property id='description'>In a project collaborative document, all project members have a right to access and modify a document before release or publication.</property>
<property id='condition'>python:object.getSourceProject() and object.isMemberOf('classification/collaborative/project')</property>
<property id='priority'>10</property>
<property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property>
<multi_property id='category'></multi_property>
<multi_property id='base_category'>source_project</multi_property>
</role>
<role id='Associate'>
<property id='title'>Project Associates</property>
<property id='description'>In a project document, all project members have a right to access the document before it is released or published.</property>
<property id='condition'>python: object.getSourceProject()</property>
<property id='priority'>10</property>
<property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property>
<multi_property id='category'></multi_property>
<multi_property id='base_category'>source_project</multi_property>
</role>
<role id='Assignor'>
<property id='title'>Project Reviewer</property>
<property id='description'>The head of the project who is in charge of reviewing documents produced by the project before release or publication.</property>
<property id='condition'>python: object.getSourceProject()</property>
<property id='priority'>10</property>
<property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property>
<multi_property id='category'>function/project/director</multi_property>
<multi_property id='base_category'>source_project</multi_property>
......@@ -40,9 +38,8 @@
<property id='title'>Team Associates</property>
<property id='description'>All team members have a right to access non restricted documents before their release or publication.</property>
<property id='condition'>python:not object.isMemberOf('classification/personnal/restricted')</property>
<property id='priority'>10</property>
<property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property>
<multi_property id='category'></multi_property>
<multi_property id='base_category'>group</multi_property>
<multi_property id='base_category'>function</multi_property>
<multi_property id='base_category'>site</multi_property>
......@@ -50,7 +47,7 @@
<role id='Auditor'>
<property id='title'>Management</property>
<property id='description'>Management has to access anydocument in the system.</property>
<property id='priority'>10</property>
<property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property>
<multi_property id='category'>function/hq</multi_property>
</role>
......
......@@ -3,7 +3,7 @@
<property id='title'>Team Reviewer</property>
<property id='description'>The head of the team who is in charge of reviewing documents published by his team. He is granted special rights on documents produced by his team.</property>
<property id='condition'>python: not object.getSourceProject()</property>
<property id='priority'>10</property>
<property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property>
<multi_property id='category'>function/publication/reviewer</multi_property>
<multi_property id='base_category'>group</multi_property>
......@@ -13,25 +13,23 @@
<property id='title'>Project Assignees</property>
<property id='description'>In a project collaborative document, all project members have a right to access and modify a document before release or publication.</property>
<property id='condition'>python:object.getSourceProject() and object.isMemberOf('classification/collaborative/project')</property>
<property id='priority'>10</property>
<property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property>
<multi_property id='category'></multi_property>
<multi_property id='base_category'>source_project</multi_property>
</role>
<role id='Associate'>
<property id='title'>Project Associates</property>
<property id='description'>In a project document, all project members have a right to access the document before it is released or published.</property>
<property id='condition'>python: object.getSourceProject()</property>
<property id='priority'>10</property>
<property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property>
<multi_property id='category'></multi_property>
<multi_property id='base_category'>source_project</multi_property>
</role>
<role id='Assignor'>
<property id='title'>Project Reviewer</property>
<property id='description'>The head of the project who is in charge of reviewing documents produced by the project before release or publication.</property>
<property id='condition'>python: object.getSourceProject()</property>
<property id='priority'>10</property>
<property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property>
<multi_property id='category'>function/project/director</multi_property>
<multi_property id='base_category'>source_project</multi_property>
......@@ -40,9 +38,8 @@
<property id='title'>Team Associates</property>
<property id='description'>All team members have a right to access non restricted documents before their release or publication.</property>
<property id='condition'>python:not object.isMemberOf('classification/personnal/restricted')</property>
<property id='priority'>10</property>
<property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property>
<multi_property id='category'></multi_property>
<multi_property id='base_category'>group</multi_property>
<multi_property id='base_category'>function</multi_property>
<multi_property id='base_category'>site</multi_property>
......@@ -50,7 +47,7 @@
<role id='Auditor'>
<property id='title'>Management</property>
<property id='description'>Management has to access anydocument in the system.</property>
<property id='priority'>10</property>
<property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property>
<multi_property id='category'>function/hq</multi_property>
</role>
......
......@@ -66,7 +66,7 @@
(like Role Definition, for example)\n
Could (perhaps should) be a parent class for OOoDocument\n
Should probably be located somewhere else\n
</string> </value>
</string> </value>
</item>
<item>
<key> <string>factory</string> </key>
......
......@@ -66,7 +66,7 @@
(like Role Definition, for example)\n
Could (perhaps should) be a parent class for OOoDocument\n
Should probably be located somewhere else\n
</string> </value>
</string> </value>
</item>
<item>
<key> <string>factory</string> </key>
......
......@@ -73,7 +73,7 @@
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<key> <string>bottom</string> </key>
<value>
<list>
<string>listbox</string>
......@@ -81,13 +81,13 @@
</value>
</item>
<item>
<key> <string>center</string> </key>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<key> <string>left</string> </key>
<value>
<list>
<string>my_title</string>
......@@ -95,7 +95,7 @@
</value>
</item>
<item>
<key> <string>right</string> </key>
<key> <string>right</string> </key>
<value>
<list>
<string>my_reference</string>
......
......@@ -70,7 +70,7 @@
<value>
<dictionary>
<item>
<key> <string>left</string> </key>
<key> <string>left</string> </key>
<value>
<list>
<string>SearchableText</string>
......
......@@ -76,7 +76,7 @@
<value>
<dictionary>
<item>
<key> <string>left</string> </key>
<key> <string>left</string> </key>
<value>
<list>
<string>my_destination_title_list</string>
......
......@@ -86,7 +86,7 @@ if object is None:\n
\n
for base_category in base_category_list:\n
category_list.append({base_category: object.getCategoryMembershipList(base_category)})\n
context.log(script.getId(),category_list)\n
#context.log(script.getId(),category_list)\n
return category_list\n
</string> </value>
</item>
......@@ -147,8 +147,6 @@ return category_list\n
<string>_getiter_</string>
<string>base_category</string>
<string>_getattr_</string>
<string>context</string>
<string>script</string>
</tuple>
</value>
</item>
......
......@@ -70,7 +70,7 @@
<value>
<dictionary>
<item>
<key> <string>left</string> </key>
<key> <string>left</string> </key>
<value>
<list>
<string>my_format</string>
......
......@@ -71,7 +71,7 @@
<value>
<dictionary>
<item>
<key> <string>left</string> </key>
<key> <string>left</string> </key>
<value>
<list>
<string>my_role_name</string>
......@@ -80,7 +80,7 @@
</value>
</item>
<item>
<key> <string>right</string> </key>
<key> <string>right</string> </key>
<value>
<list/>
</value>
......
......@@ -113,8 +113,6 @@
<tuple>
<string>sci</string>
<string>_getattr_</string>
<string>context</string>
<string>script</string>
</tuple>
</value>
</item>
......
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value><string>state_change[\'object\'].aq_inner.aq_parent.assignRoleToSecurityGroup()\n
<value> <string>state_change[\'object\'].aq_inner.aq_parent.assignRoleToSecurityGroup()\n
</string> </value>
</item>
<item>
......@@ -113,6 +113,7 @@
<tuple>
<string>state_change</string>
<string>_getattr_</string>
<string>_getitem_</string>
</tuple>
</value>
</item>
......
......@@ -70,32 +70,32 @@
<key> <string>_body</string> </key>
<value> <string>ob=state_change.object\n
kw=ob.REQUEST\n
ob.log(\'interaction\',\'edit\')\n
#ob.log(\'interaction\',\'edit\')\n
metafields=(\'title\',\'subject\',\'keywords\',\'description\',\'reference\',\'version\',\'language\')\n
f=kw.get(\'my_file\',None)\n
ob.log(\'f\',f)\n
#ob.log(\'f\',f)\n
\n
# edit metadata (only if we have OOo file)\n
if ob.hasOOfile():\n
newmeta={}\n
ob.log(\'metafields\',metafields)\n
# ob.log(\'metafields\',metafields)\n
for mf in metafields:\n
keymf=\'my_\'+mf\n
ob.log(\'keymf\',keymf)\n
# ob.log(\'keymf\',keymf)\n
if kw.has_key(keymf):\n
ob.log(\'newmeta[mf]\',kw[keymf])\n
# ob.log(\'newmeta[mf]\',kw[keymf])\n
newmeta[mf]=kw[keymf]\n
if newmeta:\n
# edit metadata via server\n
ob.editMetadata(newmeta)\n
ob.log(\'newmeta\',newmeta)\n
# ob.log(\'newmeta\',newmeta)\n
if f is not None and f:\n
# if file uploaded, then:\n
ob.log(\'file\',f)\n
# ob.log(\'file\',f)\n
fname=f.filename\n
# we check for appropriate file type (by extension, using content_type_registry)\n
ctype=context.content_type_registry.findTypeName(fname,None,None)\n
context.log(context.getPortalType(),ctype)\n
# context.log(context.getPortalType(),ctype)\n
if ctype is None:\n
raise Exception(\'File type of \'+fname+\' is not registered\')\n
if ctype!=ob.getPortalType():\n
......
57
\ No newline at end of file
75
\ No newline at end of file
0.69
\ No newline at end of file
0.70
\ 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