diff --git a/bt5/erp5_base/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml b/bt5/erp5_base/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml index 022a772ce3e316e665feab71a7862094dfafe579..7c4e4cef788647d8017c1850bb8d4480ee51cddf 100644 --- a/bt5/erp5_base/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml +++ b/bt5/erp5_base/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml @@ -41,7 +41,7 @@ </chain> <chain> <type>ERP5 Login</type> - <workflow>edit_workflow, login_interaction_workflow, login_validation_workflow</workflow> + <workflow>edit_workflow, login_validation_workflow</workflow> </chain> <chain> <type>Email</type> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/login_interaction_workflow.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/login_interaction_workflow.xml deleted file mode 100644 index 1c9b9a375dd8039d3e9f0851560946fecd29ad28..0000000000000000000000000000000000000000 --- a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/login_interaction_workflow.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0"?> -<ZopeData> - <record id="1" aka="AAAAAAAAAAE="> - <pickle> - <global name="InteractionWorkflowDefinition" module="Products.ERP5.InteractionWorkflow"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>_objects</string> </key> - <value> - <tuple/> - </value> - </item> - <item> - <key> <string>groups</string> </key> - <value> - <tuple/> - </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>login_interaction_workflow</string> </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/login_interaction_workflow/interactions.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/login_interaction_workflow/interactions.xml deleted file mode 100644 index e18bf8cbf778a6808aa24ec39bba4b527d7b1bef..0000000000000000000000000000000000000000 --- a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/login_interaction_workflow/interactions.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0"?> -<ZopeData> - <record id="1" aka="AAAAAAAAAAE="> - <pickle> - <global name="Interaction" module="Products.ERP5.Interaction"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>_mapping</string> </key> - <value> - <dictionary/> - </value> - </item> - <item> - <key> <string>_objects</string> </key> - <value> - <tuple/> - </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>interactions</string> </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/login_interaction_workflow/interactions/validate.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/login_interaction_workflow/interactions/validate.xml deleted file mode 100644 index d3433a68ab8168429b42609a907548a2b6e46bb7..0000000000000000000000000000000000000000 --- a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/login_interaction_workflow/interactions/validate.xml +++ /dev/null @@ -1,100 +0,0 @@ -<?xml version="1.0"?> -<ZopeData> - <record id="1" aka="AAAAAAAAAAE="> - <pickle> - <global name="InteractionDefinition" module="Products.ERP5.Interaction"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>actbox_category</string> </key> - <value> <string>workflow</string> </value> - </item> - <item> - <key> <string>actbox_name</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>actbox_url</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>activate_script_name</string> </key> - <value> - <tuple/> - </value> - </item> - <item> - <key> <string>after_script_name</string> </key> - <value> - <tuple/> - </value> - </item> - <item> - <key> <string>before_commit_script_name</string> </key> - <value> - <list> - <string>Workflow_ensureUserId</string> - </list> - </value> - </item> - <item> - <key> <string>description</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>guard</string> </key> - <value> - <none/> - </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>validate</string> </value> - </item> - <item> - <key> <string>method_id</string> </key> - <value> - <list> - <string>validate</string> - </list> - </value> - </item> - <item> - <key> <string>once_per_transaction</string> </key> - <value> <int>1</int> </value> - </item> - <item> - <key> <string>portal_type_filter</string> </key> - <value> - <none/> - </value> - </item> - <item> - <key> <string>portal_type_group_filter</string> </key> - <value> - <none/> - </value> - </item> - <item> - <key> <string>script_name</string> </key> - <value> - <tuple/> - </value> - </item> - <item> - <key> <string>temporary_document_disallowed</string> </key> - <value> <int>1</int> </value> - </item> - <item> - <key> <string>title</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>trigger_type</string> </key> - <value> <int>2</int> </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/login_interaction_workflow/scripts.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/login_interaction_workflow/scripts.xml deleted file mode 100644 index 072c8f6540c07806bee17a34c920ec09b2de1bd5..0000000000000000000000000000000000000000 --- a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/login_interaction_workflow/scripts.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0"?> -<ZopeData> - <record id="1" aka="AAAAAAAAAAE="> - <pickle> - <global name="Scripts" module="Products.DCWorkflow.Scripts"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>_mapping</string> </key> - <value> - <dictionary/> - </value> - </item> - <item> - <key> <string>_objects</string> </key> - <value> - <tuple/> - </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>scripts</string> </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/login_interaction_workflow/scripts/Workflow_ensureUserId.py b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/login_interaction_workflow/scripts/Workflow_ensureUserId.py deleted file mode 100644 index b0098d4797f65e98c23657a0d15c2deec86eefd5..0000000000000000000000000000000000000000 --- a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/login_interaction_workflow/scripts/Workflow_ensureUserId.py +++ /dev/null @@ -1,7 +0,0 @@ -"""Make sure the user has a user id. - -Persons that were created before user id were introduced may not have a user id already. -""" -user = state_change['object'].getParentValue() -if user.getPortalType() == 'Person' and not user.hasUserId(): - user.initUserId() diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/login_interaction_workflow/scripts/Workflow_ensureUserId.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/login_interaction_workflow/scripts/Workflow_ensureUserId.xml deleted file mode 100644 index 267ff9a01c186e21614e5e9a1340ae8d4a3466c6..0000000000000000000000000000000000000000 --- a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/login_interaction_workflow/scripts/Workflow_ensureUserId.xml +++ /dev/null @@ -1,62 +0,0 @@ -<?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>_params</string> </key> - <value> <string>state_change</string> </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>Workflow_ensureUserId</string> </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/login_interaction_workflow/variables.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/login_interaction_workflow/variables.xml deleted file mode 100644 index 6ae03699d19840ac42b097dfc0a5f34edd416170..0000000000000000000000000000000000000000 --- a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/login_interaction_workflow/variables.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0"?> -<ZopeData> - <record id="1" aka="AAAAAAAAAAE="> - <pickle> - <global name="Variables" module="Products.DCWorkflow.Variables"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>_mapping</string> </key> - <value> - <dictionary/> - </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>variables</string> </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/login_interaction_workflow/worklists.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/login_interaction_workflow/worklists.xml deleted file mode 100644 index c3432aa051eac2d67ec0692a384adb38d1b6bac8..0000000000000000000000000000000000000000 --- a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/login_interaction_workflow/worklists.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0"?> -<ZopeData> - <record id="1" aka="AAAAAAAAAAE="> - <pickle> - <global name="Worklists" module="Products.DCWorkflow.Worklists"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>_mapping</string> </key> - <value> - <dictionary/> - </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>worklists</string> </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_base/bt/template_portal_type_workflow_chain_list b/bt5/erp5_base/bt/template_portal_type_workflow_chain_list index dd21ee4140b5f491074b7497c4e367aebb15e9df..fa2742b801579f877dd7b74c874bf8e37094f522 100644 --- a/bt5/erp5_base/bt/template_portal_type_workflow_chain_list +++ b/bt5/erp5_base/bt/template_portal_type_workflow_chain_list @@ -22,7 +22,6 @@ Currency | validation_workflow Delivery Type | base_type_interaction_workflow Delivery Type | dynamic_class_generation_interaction_workflow ERP5 Login | edit_workflow -ERP5 Login | login_interaction_workflow ERP5 Login | login_validation_workflow Email | coordinate_interaction_workflow Email | edit_workflow diff --git a/bt5/erp5_base/bt/template_workflow_id_list b/bt5/erp5_base/bt/template_workflow_id_list index 7bb53cde68b00bfa3724f91005b9337cb75834bd..5f4ac40982eb406b136fc74db53c91b4e2d58d67 100644 --- a/bt5/erp5_base/bt/template_workflow_id_list +++ b/bt5/erp5_base/bt/template_workflow_id_list @@ -9,7 +9,6 @@ document_conversion_interaction_workflow document_security_interaction_workflow embedded_workflow local_permission_interaction_workflow -login_interaction_workflow login_validation_workflow movement_resource_interaction_workflow notification_message_workflow diff --git a/bt5/erp5_oauth_facebook_login/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml b/bt5/erp5_oauth_facebook_login/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml index 4eb00d05269aeb52c731143855694f46053166ae..2643e0dd4441691811d5d8f9c8a510926aa331ae 100644 --- a/bt5/erp5_oauth_facebook_login/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml +++ b/bt5/erp5_oauth_facebook_login/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml @@ -5,6 +5,6 @@ </chain> <chain> <type>Facebook Login</type> - <workflow>edit_workflow, login_interaction_workflow, validation_workflow</workflow> + <workflow>edit_workflow, validation_workflow</workflow> </chain> </workflow_chain> \ No newline at end of file diff --git a/bt5/erp5_oauth_facebook_login/bt/template_portal_type_workflow_chain_list b/bt5/erp5_oauth_facebook_login/bt/template_portal_type_workflow_chain_list index a4886ecc301fbd15507b488965d69cdbdfec2f7e..2928716b6dbc03044402c9bf957b748d7d16b65c 100644 --- a/bt5/erp5_oauth_facebook_login/bt/template_portal_type_workflow_chain_list +++ b/bt5/erp5_oauth_facebook_login/bt/template_portal_type_workflow_chain_list @@ -1,5 +1,4 @@ Facebook Connector | edit_workflow Facebook Connector | validation_workflow Facebook Login | edit_workflow -Facebook Login | login_interaction_workflow Facebook Login | validation_workflow \ No newline at end of file diff --git a/bt5/erp5_oauth_google_login/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml b/bt5/erp5_oauth_google_login/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml index 0d3b64d71be60afbbab8b0529346c4903752c31a..68367c886dfdee4541dd882c5d632b842270f7c3 100644 --- a/bt5/erp5_oauth_google_login/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml +++ b/bt5/erp5_oauth_google_login/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml @@ -5,6 +5,6 @@ </chain> <chain> <type>Google Login</type> - <workflow>edit_workflow, login_interaction_workflow, validation_workflow</workflow> + <workflow>edit_workflow, validation_workflow</workflow> </chain> </workflow_chain> \ No newline at end of file diff --git a/bt5/erp5_oauth_google_login/bt/template_portal_type_workflow_chain_list b/bt5/erp5_oauth_google_login/bt/template_portal_type_workflow_chain_list index 505c217798115d769f5062c602586c3070b7128d..3c9eb51f473e94630f9db5785e026af0fd9b0069 100644 --- a/bt5/erp5_oauth_google_login/bt/template_portal_type_workflow_chain_list +++ b/bt5/erp5_oauth_google_login/bt/template_portal_type_workflow_chain_list @@ -1,5 +1,4 @@ Google Connector | edit_workflow Google Connector | validation_workflow Google Login | edit_workflow -Google Login | login_interaction_workflow Google Login | validation_workflow \ No newline at end of file diff --git a/product/ERP5Security/tests/testERP5Security.py b/product/ERP5Security/tests/testERP5Security.py index cbeef6093ca216479f5f70abec7f7c7d46a1403d..2ab99f742cc5c462e2dcdb0359e4ceff31f40f88 100644 --- a/product/ERP5Security/tests/testERP5Security.py +++ b/product/ERP5Security/tests/testERP5Security.py @@ -887,22 +887,6 @@ class TestMigration(UserManagementTestCase): self.portal.person_module.newContent, portal_type='Person',) - def test_NonMigratedPersonCanBecomeUserLater(self): - self._enableERP5UsersPlugin() - non_migrated_person = self.portal.person_module.newContent( - portal_type='Person', - user_id=None, - ) - self.tic() - - self.portal.portal_templates.fixConsistency(filter={'constraint_type': 'post_upgrade'}) - self.tic() - non_migrated_person.newContent(portal_type='Assignment').open() - non_migrated_person.newContent(portal_type='ERP5 Login', reference='login', password='password').validate() - self.tic() - self._assertUserExists('login', 'password') - self.assertTrue(non_migrated_person.getUserId()) - class TestUserManagementExternalAuthentication(TestUserManagement): def getTitle(self):