Commit ce3b50c5 authored by Yusuke Muraoka's avatar Yusuke Muraoka

Add permission methods for DeleteObjects


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32209 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ab54057a
...@@ -145,6 +145,8 @@ class SecurityTestCase(ERP5TypeTestCase): ...@@ -145,6 +145,8 @@ class SecurityTestCase(ERP5TypeTestCase):
Permissions.AddPortalContent) Permissions.AddPortalContent)
failIfUserCanChangeLocalRoles = AssertNoPermissionMethod( failIfUserCanChangeLocalRoles = AssertNoPermissionMethod(
Permissions.ChangeLocalRoles) Permissions.ChangeLocalRoles)
failIfUserCanDeleteDocument = AssertNoPermissionMethod(
Permissions.DeleteObjects)
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.
...@@ -164,6 +166,8 @@ class SecurityTestCase(ERP5TypeTestCase): ...@@ -164,6 +166,8 @@ class SecurityTestCase(ERP5TypeTestCase):
AssertPermissionMethod(Permissions.AddPortalContent) AssertPermissionMethod(Permissions.AddPortalContent)
failUnlessUserCanChangeLocalRoles = assertUserCanChangeLocalRoles =\ failUnlessUserCanChangeLocalRoles = assertUserCanChangeLocalRoles =\
AssertPermissionMethod(Permissions.ChangeLocalRoles) AssertPermissionMethod(Permissions.ChangeLocalRoles)
failUnlessUserCanDeleteDocument = assertUserCanDeleteDocument =\
AssertPermissionMethod(Permissions.DeleteObjects)
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