[Erp5-report] r9142 - in /erp5/trunk/products: ERP5/bootstrap/erp5_core/SkinTemplateItem/po...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Aug 11 10:12:45 CEST 2006
Author: jerome
Date: Fri Aug 11 10:12:41 2006
New Revision: 9142
URL: http://svn.erp5.org?rev=9142&view=rev
Log:
when copy/paste a person, reset the login on the new person for ERP5Security.
Added:
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Person_afterClone.xml
Modified:
erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/change_log
erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
erp5/trunk/products/ERP5Security/tests/testERP5Security.py
Added: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Person_afterClone.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Person_afterClone.xml?rev=9142&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Person_afterClone.xml (added)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Person_afterClone.xml Fri Aug 11 10:12:41 2006
@@ -1,0 +1,148 @@
+<?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>
+ <none/>
+ </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>"""Hook called when a person object is closed.\n
+\n
+We want to reset the reference, which is the user login in ERP5Security.\n
+"""\n
+context.setReference(None)\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_filepath</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string></string> </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>0</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple>
+ <string>_getattr_</string>
+ <string>context</string>
+ <string>None</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>Person_afterClone</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/change_log?rev=9142&r1=9141&r2=9142&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/change_log (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/change_log Fri Aug 11 10:12:41 2006
@@ -1,3 +1,6 @@
+2006-08-11 jerome
+* when copy/paste a person, reset the login on the new person for ERP5Security.
+
2006-08-06 jerome
* remove skins to create module using a scribus file; they are now part of erp5_pdf_editor.
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=9142&r1=9141&r2=9142&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision Fri Aug 11 10:12:41 2006
@@ -1,1 +1,1 @@
-38
+40
Modified: erp5/trunk/products/ERP5Security/tests/testERP5Security.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Security/tests/testERP5Security.py?rev=9142&r1=9141&r2=9142&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Security/tests/testERP5Security.py (original)
+++ erp5/trunk/products/ERP5Security/tests/testERP5Security.py Fri Aug 11 10:12:41 2006
@@ -188,6 +188,15 @@
self._makePerson(reference='new_person')
self.assertRaises(RuntimeError, self._makePerson, reference='new_person')
+ def test_PersonCopyAndPaste(self, run=RUN_ALL_TESTS):
+ """If we copy and paste a person, login must not be copyied."""
+ person = self._makePerson(reference='new_person')
+ person_module = self.getPersonModule()
+ copy_data = person_module.manage_copyObjects([person.getId()])
+ changed, = person_module.manage_pasteObjects(copy_data)
+ self.assertNotEquals(person_module[changed['new_id']].getReference(),
+ person_module[changed['id']].getReference())
+
if __name__ == '__main__':
framework()
else:
More information about the Erp5-report
mailing list