Commit 2b33f6be authored by Romain Courteaud's avatar Romain Courteaud

Use restrictedTraverse instead of getattr to prevent Unauthorized error

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24659 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 506d5315
...@@ -60,9 +60,11 @@ def getCurrencyItemList(include_empty=1, portal_path=""):\n ...@@ -60,9 +60,11 @@ def getCurrencyItemList(include_empty=1, portal_path=""):\n
result = []\n result = []\n
if include_empty :\n if include_empty :\n
result = [[\'\', \'\'],]\n result = [[\'\', \'\'],]\n
currency_module = getattr(portal, \'currency_module\',\n currency_module = portal.restrictedTraverse(\n
getattr(portal, \'currency\', None))\n \'currency_module\', \n
portal.restrictedTraverse(\'currency\', None))\n
\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=\'View\'):\n
if not skip_invalidated or \\\n if not skip_invalidated or \\\n
currency.getProperty(\'validation_state\', \'default\') != \'invalidated\':\n currency.getProperty(\'validation_state\', \'default\') != \'invalidated\':\n
......
469 470
\ 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