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