Commit 83095316 authored by Gabriel Monnerat's avatar Gabriel Monnerat

raise exception to anonymous user

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44224 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 483007d7
...@@ -50,7 +50,12 @@ ...@@ -50,7 +50,12 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>request = context.REQUEST\n <value> <string>from zExceptions import Unauthorized\n
\n
if context.portal_membership.isAnonymousUser():\n
raise Unauthorized("You are not allowed to use this script")\n
\n
request = context.REQUEST\n
template_name = template or request.get("template")\n template_name = template or request.get("template")\n
if template_name is None:\n if template_name is None:\n
return None\n return None\n
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<tr>\n <tr>\n
<td valign="top">\n <td valign="top">\n
<div id="advertisement">\n <div id="advertisement">\n
<b>Sign in to edit documents, spreadsheets and drawing and share this document with your friends</b>\n <b>Sign in to edit documents, spreadsheets and drawing and share this document with another users</b>\n
</div>\n </div>\n
</td>\n </td>\n
<td>\n <td>\n
......
294 295
\ 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