Commit 8903f5d2 authored by Fabien Morin's avatar Fabien Morin

* remove Base_viewSecurity from test because it has moved on erp5_forge bt

* add manager proxy role on checkAccountInexistance script to be able to find all organisation.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23334 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 15bf6704
......@@ -198,15 +198,13 @@ class TestEGovMixin(SecurityTestCase):
for object in object_list:
for permission, has in security_mapping.items():
if user.has_permission(permission, object) and not has:
self.fail('%s Permission should be Unauthorized on %s\n%s' % \
self.fail('%s Permission should be Unauthorized on %s' % \
( permission,
object.getRelativeUrl(),
object.Base_viewSecurity()))
object.getRelativeUrl()))
if not(user.has_permission(permission, object)) and has:
self.fail('%s Permission should be Authorized on %s\n%s' % \
self.fail('%s Permission should be Authorized on %s' % \
( permission,
object.getRelativeUrl(),
object.Base_viewSecurity()))
object.getRelativeUrl()))
def checkTransition(self, object_list, possible_transition_list,
not_possible_transition_list, username):
......
......@@ -79,7 +79,7 @@ if len(result) > 1:\n
raise ValidationFailed, "Error : There is more than one company with the "\\\n
" registration code \'%s\'" % changed_object.getRccm()\n
\n
if len(result) and result[0].getObject().getReference():\n
if len(result) == 1 and result[0].getObject().getReference():\n
raise ValidationFailed, "Error : A company with the registration code \'%s\'"\\\n
" already exists and have already an account" % changed_object.getRccm()\n
\n
......@@ -107,6 +107,14 @@ if len((changed_object.portal_catalog(portal_type=\'Organisation\',\n
<key> <string>_params</string> </key>
<value> <string>state_change</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
......
275
\ No newline at end of file
277
\ 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