Commit 310ec456 authored by Sebastien Robin's avatar Sebastien Robin

set default security setting on foo module and fix security on testTemplate

parent f81662b5
<module>
<id>foo_module</id>
<permission_list>
<permission type='tuple'>
<name>Access Transient Objects</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Access contents information</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Access session data</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Add portal content</name>
<role>Assignor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Add portal folders</name>
<role>Assignor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Change local roles</name>
<role>Assignor</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Copy or Move</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Delete objects</name>
<role>Assignor</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>List folder contents</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Modify portal content</name>
<role>Assignor</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>View</name>
<role>Assignee</role>
......@@ -9,6 +81,15 @@
<role>Auditor</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>View History</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
</permission_list>
<portal_type>Foo Module</portal_type>
<title>Foos</title>
......
681
\ No newline at end of file
682
\ No newline at end of file
......@@ -52,7 +52,7 @@ class TestTemplate(ERP5TypeTestCase):
def createUserAndLogin(self, name=None, additional_role_list=[]):
"""login with Member, Author and specified roles."""
uf = self.getPortal().acl_users
role_list = ['Member', 'Author']
role_list = ['Member', 'Author', 'Auditor']
role_list.extend(additional_role_list)
uf._doAddUser(name, '', role_list, [])
user = uf.getUserById(name).__of__(uf)
......@@ -66,10 +66,6 @@ class TestTemplate(ERP5TypeTestCase):
self.tic()
self.portal.portal_types.Preference._setTypeAllowedContentTypeList(
('Foo', 'Knowledge Pad'))
self.portal.foo_module.manage_role(role_to_manage='Author',
permissions=[Permissions.AddPortalContent,
Permissions.CopyOrMove,
])
def test_Template(self):
self.createUserAndLogin(self.id())
......
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