Commit cf8a2d5d authored by Sebastien Robin's avatar Sebastien Robin

revert change 15745 and increase performance of view about 5%

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16885 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 562745ae
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<string>Products.PythonScripts.PythonScript</string> <tuple/>
<string>PythonScript</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -76,7 +73,6 @@ In case of duplicate, only the first action will be kept.\n ...@@ -76,7 +73,6 @@ In case of duplicate, only the first action will be kept.\n
The script must be called on the context of the document.\n The script must be called on the context of the document.\n
"""\n """\n
from Products.ERP5Type.Cache import CachingMethod\n from Products.ERP5Type.Cache import CachingMethod\n
from AccessControl import getSecurityManager\n
def filterDuplicateActions(actions):\n def filterDuplicateActions(actions):\n
new_actions = dict()\n new_actions = dict()\n
\n \n
...@@ -108,7 +104,8 @@ hasDuplicateActions = CachingMethod(\n ...@@ -108,7 +104,8 @@ hasDuplicateActions = CachingMethod(\n
id=\'Base_filterDuplicateActions.hasDuplicateActions\',\n id=\'Base_filterDuplicateActions.hasDuplicateActions\',\n
cache_factory=\'erp5_ui_long\')\n cache_factory=\'erp5_ui_long\')\n
\n \n
user_name = str(getSecurityManager().getUser())\n user_name = getattr(container.REQUEST, \'AUTHENTICATED_USER\', \'\')\n
\n
if getattr(context, \'getPortalType\', None) is not None:\n if getattr(context, \'getPortalType\', None) is not None:\n
if hasDuplicateActions(context.getPortalType(), user_name):\n if hasDuplicateActions(context.getPortalType(), user_name):\n
return filterDuplicateActions(actions)\n return filterDuplicateActions(actions)\n
...@@ -164,14 +161,12 @@ return actions\n ...@@ -164,14 +161,12 @@ return actions\n
<string>actions</string> <string>actions</string>
<string>Products.ERP5Type.Cache</string> <string>Products.ERP5Type.Cache</string>
<string>CachingMethod</string> <string>CachingMethod</string>
<string>AccessControl</string>
<string>getSecurityManager</string>
<string>filterDuplicateActions</string> <string>filterDuplicateActions</string>
<string>hasDuplicateActions</string> <string>hasDuplicateActions</string>
<string>str</string> <string>getattr</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>container</string>
<string>user_name</string> <string>user_name</string>
<string>getattr</string>
<string>context</string> <string>context</string>
<string>None</string> <string>None</string>
</tuple> </tuple>
......
447 440
\ 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