Commit abf30c37 authored by Jérome Perrin's avatar Jérome Perrin

use acl_users.erp5_users.getUserByLogin which is cached and unrestricted.

remove proxy role which is therefore no longer needed

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35532 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6d5b6c3d
...@@ -58,13 +58,13 @@ Returns None if no corresponding person, for example when not using ERP5Security ...@@ -58,13 +58,13 @@ Returns None if no corresponding person, for example when not using ERP5Security
"""\n """\n
if user_name is None:\n if user_name is None:\n
user_name = context.portal_membership.getAuthenticatedMember()\n user_name = context.portal_membership.getAuthenticatedMember()\n
found_user_list = context.portal_catalog(portal_type=\'Person\', \n \n
reference=str(user_name))\n found_user_list = context.acl_users.erp5_users.getUserByLogin(str(user_name))\n
found_users = len(found_user_list)\n found_users = len(found_user_list)\n
if found_users != 1:\n if found_users != 1:\n
return None\n return None\n
\n \n
return found_user_list[0].getObject()\n return found_user_list[0]\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -80,9 +80,7 @@ return found_user_list[0].getObject()\n ...@@ -80,9 +80,7 @@ return found_user_list[0].getObject()\n
<item> <item>
<key> <string>_proxy_roles</string> </key> <key> <string>_proxy_roles</string> </key>
<value> <value>
<tuple> <tuple/>
<string>Manager</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
747 748
\ 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