Commit ad606c2f authored by Mame Coumba Sall's avatar Mame Coumba Sall

Modified script so that not only an Assignor but any user who has Modify...

Modified script so that not only an Assignor but any user who has Modify portal content can calculate quantity on Currency Purchase.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31714 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 65818485
......@@ -55,11 +55,10 @@
<key> <string>_body</string> </key>
<value> <string>from AccessControl import getSecurityManager\n
u=getSecurityManager().getUser()\n
role_list = u.getRolesInContext(context)\n
if \'Assignor\' in role_list:\n
return True\n
if u.has_permission("Modify portal content",context):\n
return True\n
else:\n
return False\n
return False\n
</string> </value>
</item>
<item>
......@@ -109,7 +108,6 @@ else:\n
<string>_getattr_</string>
<string>u</string>
<string>context</string>
<string>role_list</string>
<string>True</string>
<string>False</string>
</tuple>
......
525
\ No newline at end of file
526
\ 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