[Erp5-report] r15745 - in /erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style: SkinTemplat...
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Aug 20 10:50:32 CEST 2007
Author: jerome
Date: Mon Aug 20 10:50:32 2007
New Revision: 15745
URL: http://svn.erp5.org?rev=15745&view=rev
Log:
Use getSecurityManager().getUser() to get the user name, because REQUEST.AUTHENTICATED_USER is not defined in ZopeTestCase requests.
Modified:
erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_filterDuplicateActions.xml
erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_filterDuplicateActions.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_filterDuplicateActions.xml?rev=15745&r1=15744&r2=15745&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_filterDuplicateActions.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_filterDuplicateActions.xml Mon Aug 20 10:50:32 2007
@@ -75,7 +75,8 @@
`actions` is the mapping returned by ActionsTool.listFilteredActionsFor\n
The script must be called on the context of the document.\n
"""\n
-\n
+from Products.ERP5Type.Cache import CachingMethod\n
+from AccessControl import getSecurityManager\n
def filterDuplicateActions(actions):\n
new_actions = dict()\n
\n
@@ -102,13 +103,12 @@
return len_actions != len_filtered_actions\n
\n
\n
-from Products.ERP5Type.Cache import CachingMethod\n
hasDuplicateActions = CachingMethod(\n
hasDuplicateActions,\n
id=\'Base_filterDuplicateActions.hasDuplicateActions\',\n
cache_factory=\'erp5_ui_long\')\n
\n
-user_name = str(container.REQUEST.AUTHENTICATED_USER)\n
+user_name = str(getSecurityManager().getUser())\n
if getattr(context, \'getPortalType\', None) is not None:\n
if hasDuplicateActions(context.getPortalType(), user_name):\n
return filterDuplicateActions(actions)\n
@@ -162,13 +162,14 @@
<value>
<tuple>
<string>actions</string>
+ <string>Products.ERP5Type.Cache</string>
+ <string>CachingMethod</string>
+ <string>AccessControl</string>
+ <string>getSecurityManager</string>
<string>filterDuplicateActions</string>
<string>hasDuplicateActions</string>
- <string>Products.ERP5Type.Cache</string>
- <string>CachingMethod</string>
<string>str</string>
<string>_getattr_</string>
- <string>container</string>
<string>user_name</string>
<string>getattr</string>
<string>context</string>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision?rev=15745&r1=15744&r2=15745&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision Mon Aug 20 10:50:32 2007
@@ -1,1 +1,1 @@
-414
+415
More information about the Erp5-report
mailing list