Commit efc83109 authored by Kevin Deldycke's avatar Kevin Deldycke

Delete custom version of ERP5Type_getSecurityCategoryFromAssignment. Move it to erp5_core.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4553 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0d28d284
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value> <string encoding="base64">O/INCg==</string> </value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</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># XXX For now, this script requires proxy manager\n
\n
# base_category_list : list of category values we need to retrieve\n
# user_name : string obtained from getSecurityManager().getUser().getUserName() [NuxUserGroup]\n
# When using PluggableAuthService with ERP5GroupMAnager, user_name is the id\n
# of the person linked to getUser().getId() through getReference() (which is its login).\n
# object : object which we want to assign roles to.\n
# portal_type : portal type of object\n
\n
# must always return a list of dicts\n
\n
category_list = []\n
\n
person_module = context.portal_url.getPortalObject().getDefaultModule(\'Person\')\n
person_object = getattr(person_module, user_name, None)\n
\n
# if a person_object was not found in the module, we do nothing more\n
# this happens for example when a manager with no associated person object\n
# creates a person_object for a new user\n
if person_object is None:\n
return []\n
\n
# We look for valid assignments of this user\n
for assignment in person_object.contentValues(filter={\'portal_type\': \'Assignment\'}):\n
if assignment.getValidationState() == \'open\':\n
category_dict = {}\n
for base_category in base_category_list:\n
### Here is the filter patch waiting bug #124 to be corrected ###\n
if base_category.find("_btsave") == -1:\n
### end of filter patch ###\n
category_value = assignment.getProperty(base_category)\n
if category_value not in (None, \'\'):\n
category_dict[base_category] = category_value\n
else:\n
raise RuntimeError, "Error: \'%s\' property is required in order to update person security group" % (base_category)\n
category_list.append(category_dict)\n
\n
return category_list\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jBAAAABIAAAAXAAAAQwAA
AHNIAQAAZwAAfQQAdAEAdAEAdAEAdAIAZAEAgwIAZAIAgwIAgwAAZAMAgwIAZAQAgwEAfQcAdAQA
fAcAfAEAdAYAgwMAfQoAfAoAdAYAaggAbwgAAWcAAFNuAQABeOYAdAgAdAEAfAoAZAUAgwIAZAYA
aAAABGQHAGQIAAM8gwABgwEARF29AH0MAHQBAHwMAGQJAIMCAIMAAGQKAGoCAG+eAAFoAAB9DQB4
fgB0CAB8AACDAQBEXXAAfQ4AdAEAfA4AZAsAgwIAZAwAgwEAZA0AC2oCAG9NAAF0AQB8DABkDgCD
AgB8DgCDAQB9DwB8DwB0BgBkDwBmAgBqBwBvFAABfA8AdA4AfA0AgwEAfA4APHEhAQF0DwBkEAB8
DgAWggIAcbEAAXGxAFd0AQB8BABkEQCDAgB8DQCDAQABcX8AAXF/AFd8BABTZAAAUygSAAAATnMK
AAAAcG9ydGFsX3VybHMPAAAAZ2V0UG9ydGFsT2JqZWN0cxAAAABnZXREZWZhdWx0TW9kdWxlcwYA
AABQZXJzb25zDQAAAGNvbnRlbnRWYWx1ZXNzBgA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QNVR5cGVfZ2V0U2VjdXJpdHlDYXRlZ29yeUZyb21Bc3NpZ25tZW50AQAA
AHMkAAAAAAsGAioBEgUNAQgDKAAGARkBBgENAAYCHQIVARMBFAIYARgCKAEAAABzKgAAAEVSUDVU
eXBlX2dldFNlY3VyaXR5Q2F0ZWdvcnlGcm9tQXNzaWdubWVudCgBAAAAcyoAAABFUlA1VHlwZV9n
ZXRTZWN1cml0eUNhdGVnb3J5RnJvbUFzc2lnbm1lbnQoAAAAACgAAAAAcw8AAABTY3JpcHQgKFB5
dGhvbilzCAAAADxtb2R1bGU+AQAAAHMAAAAA</string> </value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/baobab/portal_skins/erp5_banking_core/ERP5Type_getSecurityCategoryFromAssignment</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>base_category_list, user_name, object, portal_type</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>base_category_list</string>
<string>user_name</string>
<string>object</string>
<string>portal_type</string>
<string>category_list</string>
<string>_getattr_</string>
<string>context</string>
<string>person_module</string>
<string>getattr</string>
<string>None</string>
<string>person_object</string>
<string>_getiter_</string>
<string>assignment</string>
<string>category_dict</string>
<string>base_category</string>
<string>category_value</string>
<string>_write_</string>
<string>RuntimeError</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Type_getSecurityCategoryFromAssignment</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>custom version that filter the returned list. this must be removed when bug #124 will be closed</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2005-12-08 Kevin
* Delete custom version of ERP5Type_getSecurityCategoryFromAssignment. Move it to erp5_core.
2005-12-07 Kevin
* Move CashDetail_loadScript_example, Container_fastInputUpdate, Container_getContaineeTotalPrice, CounterModule_getVaultTransactionList, ImportCsvToCategories to erp5_baobab_config because they contain reference to the local currency.
* Add a custom version of ERP5Type_getSecurityCategoryFromAssignment to filter the category list and not include categories saved by Business Templates. This customisation must be removed when bug #124 will be corrected.
......
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