From bfbf3dd394c209dc2c748d28a6b9af525ddb0e12 Mon Sep 17 00:00:00 2001
From: Yusei Tahara <yusei@nexedi.com>
Date: Wed, 31 Mar 2010 06:17:25 +0000
Subject: [PATCH] 2010-03-31 yusei * Use "Access contents information" instead
 of "View" to check if currency can be displayed or not.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34219 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../CurrencyModule_getCurrencyItemList.xml        | 15 ++++++++++-----
 bt5/erp5_base/bt/change_log                       |  3 +++
 bt5/erp5_base/bt/revision                         |  2 +-
 3 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyModule_getCurrencyItemList.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyModule_getCurrencyItemList.xml
index ac6fa1a521..587013a8f8 100644
--- a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyModule_getCurrencyItemList.xml
+++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyModule_getCurrencyItemList.xml
@@ -53,8 +53,11 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string>portal = context.getPortalObject()\n
-from ZTUtils import LazyFilter\n
+            <value> <string>from ZTUtils import LazyFilter\n
+from Products.CMFCore.permissions import AccessContentsInformation\n
+\n
+\n
+portal = context.getPortalObject()\n
 \n
 def getCurrencyItemList(include_empty=1, portal_path=""):\n
   result = []\n
@@ -65,7 +68,7 @@ def getCurrencyItemList(include_empty=1, portal_path=""):\n
                              portal.restrictedTraverse(\'currency\', None))\n
 \n
   if currency_module is not None:\n
-    for currency in LazyFilter(currency_module.contentValues(), skip=\'View\'):\n
+    for currency in LazyFilter(currency_module.contentValues(), skip=AccessContentsInformation):\n
       if not skip_invalidated or \\\n
             currency.getProperty(\'validation_state\', \'default\') != \'invalidated\':\n
         # for currency, we intentionaly use reference (EUR) not title (Euros).\n
@@ -121,11 +124,13 @@ return getCurrencyItemList( include_empty=include_empty,\n
                           <tuple>
                             <string>include_empty</string>
                             <string>skip_invalidated</string>
+                            <string>ZTUtils</string>
+                            <string>LazyFilter</string>
+                            <string>Products.CMFCore.permissions</string>
+                            <string>AccessContentsInformation</string>
                             <string>_getattr_</string>
                             <string>context</string>
                             <string>portal</string>
-                            <string>ZTUtils</string>
-                            <string>LazyFilter</string>
                             <string>getCurrencyItemList</string>
                             <string>Products.ERP5Type.Cache</string>
                             <string>CachingMethod</string>
diff --git a/bt5/erp5_base/bt/change_log b/bt5/erp5_base/bt/change_log
index cf477c15fd..3d56c4c1c3 100644
--- a/bt5/erp5_base/bt/change_log
+++ b/bt5/erp5_base/bt/change_log
@@ -1,3 +1,6 @@
+2010-03-31 yusei
+* Use "Access contents information" instead of "View" to check if currency can be displayed or not.
+
 2010-03-11 yusuke
 * Reference generating script comes from erp5_trade.
 
diff --git a/bt5/erp5_base/bt/revision b/bt5/erp5_base/bt/revision
index c5321a6e72..20f3ba5854 100644
--- a/bt5/erp5_base/bt/revision
+++ b/bt5/erp5_base/bt/revision
@@ -1 +1 @@
-709
\ No newline at end of file
+710
\ No newline at end of file
-- 
2.30.9