[Erp5-report] r32857 jerome - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplat...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Feb 19 14:06:59 CET 2010
Author: jerome
Date: Fri Feb 19 14:06:58 2010
New Revision: 32857
URL: http://svn.erp5.org?rev=32857&view=rev
Log:
Don't cache here. We could cache in listFilteredActionsFor instead
Modified:
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_checkPermission.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_checkPermission.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_checkPermission.xml?rev=32857&r1=32856&r2=32857&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_checkPermission.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_checkPermission.xml [utf8] Fri Feb 19 14:06:58 2010
@@ -55,17 +55,12 @@
<key> <string>_body</string> </key>
<value> <string># Check for a permission on an object specified by a given path\n
# for current user. Return true only if the user is allowed.\n
-cache = container.REQUEST.other\n
-try:\n
- return cache[(script.getId(), path, permission)]\n
-except KeyError:\n
- allowed = False\n
- portal = context.getPortalObject()\n
- ob = portal.restrictedTraverse(path, None)\n
- if ob is not None:\n
- allowed = portal.portal_membership.checkPermission(permission, ob)\n
- cache[(script.getId(), path, permission)] = allowed\n
- return allowed\n
+\n
+portal = context.getPortalObject()\n
+ob = portal.restrictedTraverse(path, None)\n
+if ob is not None:\n
+ return portal.portal_membership.checkPermission(permission, ob)\n
+return False\n
</string> </value>
</item>
<item>
@@ -105,18 +100,11 @@
<string>path</string>
<string>permission</string>
<string>_getattr_</string>
- <string>container</string>
- <string>cache</string>
- <string>_getitem_</string>
- <string>script</string>
- <string>KeyError</string>
- <string>False</string>
- <string>allowed</string>
<string>context</string>
<string>portal</string>
<string>None</string>
<string>ob</string>
- <string>_write_</string>
+ <string>False</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=32857&r1=32856&r2=32857&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] Fri Feb 19 14:06:58 2010
@@ -1,1 +1,1 @@
-1481
+1484
More information about the Erp5-report
mailing list