Commit a1a82c66 authored by Aurel's avatar Aurel

Check that the reference input by user is not already defined in acl-users folders

parent 98d2211f
...@@ -60,6 +60,11 @@ for reference in reference_list:\n ...@@ -60,6 +60,11 @@ for reference in reference_list:\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
reference = editor\n reference = editor\n
\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 # ... then check already created accounts\n
if portal.portal_catalog.getResultValue(\n if portal.portal_catalog.getResultValue(\n
reference = reference, \n reference = reference, \n
......
547 548
\ 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