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 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -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
"""\n
from Products.ERP5Type.Cache import CachingMethod\n
from AccessControl import getSecurityManager\n
def filterDuplicateActions(actions):\n
new_actions = dict()\n
\n
......@@ -108,7 +104,8 @@ hasDuplicateActions = CachingMethod(\n
id=\'Base_filterDuplicateActions.hasDuplicateActions\',\n
cache_factory=\'erp5_ui_long\')\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 hasDuplicateActions(context.getPortalType(), user_name):\n
return filterDuplicateActions(actions)\n
......@@ -164,14 +161,12 @@ return actions\n
<string>actions</string>
<string>Products.ERP5Type.Cache</string>
<string>CachingMethod</string>
<string>AccessControl</string>
<string>getSecurityManager</string>
<string>filterDuplicateActions</string>
<string>hasDuplicateActions</string>
<string>str</string>
<string>getattr</string>
<string>_getattr_</string>
<string>container</string>
<string>user_name</string>
<string>getattr</string>
<string>context</string>
<string>None</string>
</tuple>
......
447
\ No newline at end of file
440
\ 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