Commit 9edeb7a6 authored by Bartek Górny's avatar Bartek Górny

Security fixes (to avoid exception when not enough permissions)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12574 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 161973f7
...@@ -127,7 +127,7 @@ if lng and lng != \'0\':\n ...@@ -127,7 +127,7 @@ if lng and lng != \'0\':\n
search_string += \' language:%s\' % lng\n search_string += \' language:%s\' % lng\n
\n \n
# category search\n # category search\n
for category in context.portal_preferences.getPreferredDocumentBaseCategoryList():\n for category in (context.portal_preferences.getPreferredDocumentBaseCategoryList() or ()):\n
category_value = req.get(\'subfield_field_your_category_list_\' + category)\n category_value = req.get(\'subfield_field_your_category_list_\' + category)\n
if category_value:\n if category_value:\n
search_string += \' %s:%s\' % (category, category_value)\n search_string += \' %s:%s\' % (category, category_value)\n
......
...@@ -299,7 +299,7 @@ ...@@ -299,7 +299,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>here/portal_preferences/getPreferredDocumentBaseCategoryList</string> </value> <value> <string>python: here.portal_preferences.getPreferredDocumentBaseCategoryList() or []</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
500 502
\ 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