Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
erp5
Commits
310ec456
Commit
310ec456
authored
Apr 23, 2012
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set default security setting on foo module and fix security on testTemplate
parent
f81662b5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
6 deletions
+83
-6
bt5/erp5_ui_test/ModuleTemplateItem/foo_module.xml
bt5/erp5_ui_test/ModuleTemplateItem/foo_module.xml
+81
-0
bt5/erp5_ui_test/bt/revision
bt5/erp5_ui_test/bt/revision
+1
-1
product/ERP5/tests/testTemplate.py
product/ERP5/tests/testTemplate.py
+1
-5
No files found.
bt5/erp5_ui_test/ModuleTemplateItem/foo_module.xml
View file @
310ec456
<module>
<module>
<id>
foo_module
</id>
<id>
foo_module
</id>
<permission_list>
<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'
>
<permission
type=
'tuple'
>
<name>
View
</name>
<name>
View
</name>
<role>
Assignee
</role>
<role>
Assignee
</role>
...
@@ -9,6 +81,15 @@
...
@@ -9,6 +81,15 @@
<role>
Auditor
</role>
<role>
Auditor
</role>
<role>
Manager
</role>
<role>
Manager
</role>
</permission>
</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>
</permission_list>
<portal_type>
Foo Module
</portal_type>
<portal_type>
Foo Module
</portal_type>
<title>
Foos
</title>
<title>
Foos
</title>
...
...
bt5/erp5_ui_test/bt/revision
View file @
310ec456
681
682
\ No newline at end of file
\ No newline at end of file
product/ERP5/tests/testTemplate.py
View file @
310ec456
...
@@ -52,7 +52,7 @@ class TestTemplate(ERP5TypeTestCase):
...
@@ -52,7 +52,7 @@ class TestTemplate(ERP5TypeTestCase):
def
createUserAndLogin
(
self
,
name
=
None
,
additional_role_list
=
[]):
def
createUserAndLogin
(
self
,
name
=
None
,
additional_role_list
=
[]):
"""login with Member, Author and specified roles."""
"""login with Member, Author and specified roles."""
uf
=
self
.
getPortal
().
acl_users
uf
=
self
.
getPortal
().
acl_users
role_list
=
[
'Member'
,
'Author'
]
role_list
=
[
'Member'
,
'Author'
,
'Auditor'
]
role_list
.
extend
(
additional_role_list
)
role_list
.
extend
(
additional_role_list
)
uf
.
_doAddUser
(
name
,
''
,
role_list
,
[])
uf
.
_doAddUser
(
name
,
''
,
role_list
,
[])
user
=
uf
.
getUserById
(
name
).
__of__
(
uf
)
user
=
uf
.
getUserById
(
name
).
__of__
(
uf
)
...
@@ -66,10 +66,6 @@ class TestTemplate(ERP5TypeTestCase):
...
@@ -66,10 +66,6 @@ class TestTemplate(ERP5TypeTestCase):
self
.
tic
()
self
.
tic
()
self
.
portal
.
portal_types
.
Preference
.
_setTypeAllowedContentTypeList
(
self
.
portal
.
portal_types
.
Preference
.
_setTypeAllowedContentTypeList
(
(
'Foo'
,
'Knowledge Pad'
))
(
'Foo'
,
'Knowledge Pad'
))
self
.
portal
.
foo_module
.
manage_role
(
role_to_manage
=
'Author'
,
permissions
=
[
Permissions
.
AddPortalContent
,
Permissions
.
CopyOrMove
,
])
def
test_Template
(
self
):
def
test_Template
(
self
):
self
.
createUserAndLogin
(
self
.
id
())
self
.
createUserAndLogin
(
self
.
id
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment