Commit 211674ac authored by Jean-Paul Smets's avatar Jean-Paul Smets

Automatically set configuration form. Use Unauthorized exception to catch invisible breadcrumb.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21113 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8ba61613
......@@ -119,7 +119,7 @@
folder. The later is recommended for hosting\n
multiple sites on a single ERP5Site instance.\n
"""\n
from ZODB.POSException import ConflictError\n
from zExceptions import Unauthorized\n
if document is None: document = context\n
crumb_list = []\n
\n
......@@ -133,9 +133,7 @@ for i in range(0, len(chain_list)):\n
crumb.title\n
, crumb\n
))\n
except ConflictError:\n
raise\n
except:\n
except Unauthorized:\n
# We should ignore any item in the chain which raises \n
# a security exception. We use a catchall except here\n
# because there is no way to import Unauthorized permission\n
......@@ -198,8 +196,8 @@ return crumb_list\n
<value>
<tuple>
<string>document</string>
<string>ZODB.POSException</string>
<string>ConflictError</string>
<string>zExceptions</string>
<string>Unauthorized</string>
<string>None</string>
<string>context</string>
<string>crumb_list</string>
......
......@@ -72,10 +72,7 @@
# Set Web Site layout to default one\n
context.setContainerLayout(\'erp5_web_layout\')\n
context.setContentLayout(\'erp5_web_content_layout\')\n
\n
# Set default webmaster to current user\n
# user_id = context.portal_membership.getAuthenticatedMember().getUserName()\n
# context.setWebmaster(user_id)\n
context.setLayoutConfigurationFormId(\'WebSection_viewDefaultThemeConfiguration\')\n
</string> </value>
</item>
<item>
......
628
\ No newline at end of file
630
\ 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