Commit 7d3839ef authored by Fabien Morin's avatar Fabien Morin

add methods for ChangeLocalRoles permissions


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24624 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2d2b1ab7
...@@ -143,6 +143,8 @@ class SecurityTestCase(ERP5TypeTestCase): ...@@ -143,6 +143,8 @@ class SecurityTestCase(ERP5TypeTestCase):
Permissions.ModifyPortalContent) Permissions.ModifyPortalContent)
failIfUserCanAddDocument = AssertNoPermissionMethod( failIfUserCanAddDocument = AssertNoPermissionMethod(
Permissions.AddPortalContent) Permissions.AddPortalContent)
failIfUserCanChangeLocalRoles = AssertNoPermissionMethod(
Permissions.ChangeLocalRoles)
def failIfUserHavePermissionOnDocument(self, permission_name, username, document): def failIfUserHavePermissionOnDocument(self, permission_name, username, document):
"""Fail If the user have a permission on document. """Fail If the user have a permission on document.
...@@ -160,6 +162,8 @@ class SecurityTestCase(ERP5TypeTestCase): ...@@ -160,6 +162,8 @@ class SecurityTestCase(ERP5TypeTestCase):
AssertPermissionMethod(Permissions.ModifyPortalContent) AssertPermissionMethod(Permissions.ModifyPortalContent)
failUnlessUserCanAddDocument = assertUserCanAddDocument =\ failUnlessUserCanAddDocument = assertUserCanAddDocument =\
AssertPermissionMethod(Permissions.AddPortalContent) AssertPermissionMethod(Permissions.AddPortalContent)
failUnlessUserCanChangeLocalRoles = assertUserCanChangeLocalRoles =\
AssertPermissionMethod(Permissions.ChangeLocalRoles)
def failUnlessUserHavePermissionOnDocument(self, permission_name, username, document): def failUnlessUserHavePermissionOnDocument(self, permission_name, username, document):
"""Fail Unless the user have a permission on document.""" """Fail Unless the user have a permission on document."""
......
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