Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Romain Courteaud
slapos.core
Commits
691116a7
Commit
691116a7
authored
Nov 03, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: test Notification Message local roles
parent
da801da3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
12 deletions
+39
-12
master/bt5/slapos_erp5/LocalRolesTemplateItem/notification_message_module.xml
...p5/LocalRolesTemplateItem/notification_message_module.xml
+4
-4
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Notification%20Message%20Module.xml
...TypeRolesTemplateItem/Notification%20Message%20Module.xml
+4
-4
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Notification%20Message.xml
...p5/PortalTypeRolesTemplateItem/Notification%20Message.xml
+10
-4
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
...l_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
+21
-0
No files found.
master/bt5/slapos_erp5/LocalRolesTemplateItem/notification_message_module.xml
View file @
691116a7
<local_roles_item>
<local_roles>
<role
id=
'
G-COMPANY
'
>
<role
id=
'
F-SALE*
'
>
<item>
Auditor
</item>
<item>
Author
</item>
</role>
</local_roles>
<local_role_group_ids>
<local_role_group_id
id=
'
group
'
>
<principal
id=
'
G-COMPANY
'
>
Auditor
</principal>
<principal
id=
'
G-COMPANY
'
>
Author
</principal>
<local_role_group_id
id=
'
function
'
>
<principal
id=
'
F-SALE*
'
>
Auditor
</principal>
<principal
id=
'
F-SALE*
'
>
Author
</principal>
</local_role_group_id>
</local_role_group_ids>
</local_roles_item>
\ No newline at end of file
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Notification%20Message%20Module.xml
View file @
691116a7
<type_roles>
<role
id=
'Author; Auditor'
>
<property
id=
'title'
>
Group company
</property>
<multi_property
id=
'categories'
>
local_role_group/
group
</multi_property>
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'base_category'
>
group
</multi_property>
<property
id=
'title'
>
Sale
</property>
<multi_property
id=
'categories'
>
local_role_group/
function
</multi_property>
<multi_property
id=
'category'
>
function/sale*
</multi_property>
<multi_property
id=
'base_category'
>
function
</multi_property>
</role>
</type_roles>
\ No newline at end of file
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Notification%20Message.xml
View file @
691116a7
<type_roles>
<role
id=
'Assignee'
>
<property
id=
'title'
>
Sale Agent
</property>
<multi_property
id=
'categories'
>
local_role_group/function
</multi_property>
<multi_property
id=
'category'
>
function/sale/agent
</multi_property>
<multi_property
id=
'base_category'
>
function
</multi_property>
</role>
<role
id=
'Assignor'
>
<property
id=
'title'
>
Group company
</property>
<multi_property
id=
'categories'
>
local_role_group/
group
</multi_property>
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'base_category'
>
group
</multi_property>
<property
id=
'title'
>
Sale Manager
</property>
<multi_property
id=
'categories'
>
local_role_group/
function
</multi_property>
<multi_property
id=
'category'
>
function/sale/manager
</multi_property>
<multi_property
id=
'base_category'
>
function
</multi_property>
</role>
</type_roles>
\ No newline at end of file
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
View file @
691116a7
...
...
@@ -1914,3 +1914,24 @@ class TestQuery(TestSlapOSGroupRoleSecurityMixin):
self
.
assertRoles
(
delivery
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
delivery
,
person
.
getUserId
(),
[])
class
TestNotificationMessageModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_NotificationMessageModule
(
self
):
module
=
self
.
portal
.
notification_message_module
self
.
assertSecurityGroup
(
module
,
[
'F-SALE*'
,
module
.
Base_getOwnerId
()],
False
)
self
.
assertRoles
(
module
,
'F-SALE*'
,
[
'Auditor'
,
'Author'
])
self
.
assertRoles
(
module
,
module
.
Base_getOwnerId
(),
[
'Owner'
])
class
TestNotificationMessage
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_NotificationMessage_default
(
self
):
delivery
=
self
.
portal
.
notification_message_module
.
newContent
(
portal_type
=
'Notification Message'
)
self
.
assertSecurityGroup
(
delivery
,
[
'F-SALEAGT'
,
'F-SALEMAN'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
delivery
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
delivery
,
'F-SALEAGT'
,
[
'Assignee'
])
self
.
assertRoles
(
delivery
,
'F-SALEMAN'
,
[
'Assignor'
])
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