From a1a82c66c999dad44540c1f89eb5571288b237db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com> Date: Thu, 24 Jan 2013 16:37:00 +0100 Subject: [PATCH] Check that the reference input by user is not already defined in acl-users folders --- .../BusinessConfiguration_validateCustomerUsername.xml | 5 +++++ bt5/erp5_configurator/bt/revision | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_validateCustomerUsername.xml b/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_validateCustomerUsername.xml index 34208b3c78..c9709bb89d 100644 --- a/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_validateCustomerUsername.xml +++ b/bt5/erp5_configurator/SkinTemplateItem/portal_skins/erp5_configurator/BusinessConfiguration_validateCustomerUsername.xml @@ -60,6 +60,11 @@ for reference in reference_list:\n portal = context.getPortalObject()\n reference = editor\n \n +# check this is a not a reference from acl_user\n +if portal.acl_users.getUserById(reference) is not None or \\\n + portal.aq_parent.acl_users.getUserById(reference) is not None:\n + return 0\n +\n # ... then check already created accounts\n if portal.portal_catalog.getResultValue(\n reference = reference, \n diff --git a/bt5/erp5_configurator/bt/revision b/bt5/erp5_configurator/bt/revision index ea5ca3642f..dd35c6b71f 100644 --- a/bt5/erp5_configurator/bt/revision +++ b/bt5/erp5_configurator/bt/revision @@ -1 +1 @@ -547 \ No newline at end of file +548 \ No newline at end of file -- 2.30.9