Commit c67eb497 authored by Gabriel Monnerat's avatar Gabriel Monnerat

- Add skin layer priority to erp5_web_ung_theme to be before erp5_base

- Overwrite script used by person_interaction_workflow. The goal is customize the script to UNG

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45605 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 28ff3d21
...@@ -6,12 +6,33 @@ ...@@ -6,12 +6,33 @@
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>business_template_skin_layer_priority</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>float</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item> <item>
<key> <string>_objects</string> </key> <key> <string>_objects</string> </key>
<value> <value>
<tuple/> <tuple/>
</value> </value>
</item> </item>
<item>
<key> <string>business_template_skin_layer_priority</string> </key>
<value> <float>10.0</float> </value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>erp5_web_ung_theme</string> </value> <value> <string>erp5_web_ung_theme</string> </value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>"""\n
Script customized to UNG to don\'t check the preference permission\n
"""\n
\n
if REQUEST is not None:\n
from zExceptions import Unauthorized\n
raise Unauthorized(script.getId())\n
\n
portal = context.getPortalObject()\n
\n
if not context.getReference():\n
# noop in case if invoked on non loggable object\n
return\n
\n
from Products.ERP5Type.Message import translateString\n
preference = portal.portal_preferences.createPreferenceForUser(\n
context.getReference(), enable=True)\n
\n
preference.setTitle(translateString(\'Preference for ${name}\',\n
mapping=dict(name=context.getTitle().decode(\'utf-8\'))))\n
\n
for assignment in context.contentValues(portal_type=\'Assignment\'):\n
group = assignment.getGroup(base=True)\n
if group:\n
preference.setPreferredSectionCategory(group)\n
preference.setPreferredAccountingTransactionSectionCategory(group)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>REQUEST=None</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Person_createUserPreference</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -57,6 +57,8 @@ if REQUEST.has_key(\'portal_skin\'):\n ...@@ -57,6 +57,8 @@ if REQUEST.has_key(\'portal_skin\'):\n
# XXX get cookie name from key authentication plugin\n # XXX get cookie name from key authentication plugin\n
REQUEST.RESPONSE.expireCookie(\'__ac\', path="/")\n REQUEST.RESPONSE.expireCookie(\'__ac\', path="/")\n
REQUEST.RESPONSE.expireCookie(\'__key\', path="/")\n REQUEST.RESPONSE.expireCookie(\'__key\', path="/")\n
\n
return Base_redirect(context.absolute_url())\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
359 360
\ 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