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
0
Merge Requests
0
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
Titouan Soulard
slapos.core
Commits
e9e11516
Commit
e9e11516
authored
Jan 29, 2013
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give user access to his aggregated PL.
parent
38ec3fb3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
2 deletions
+19
-2
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Sale%20Packing%20List.xml
...rp5/PortalTypeRolesTemplateItem/Sale%20Packing%20List.xml
+1
-1
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5GroupRoleSecurity.py
..._erp5/TestTemplateItem/testSlapOSERP5GroupRoleSecurity.py
+17
-0
master/bt5/slapos_erp5/bt/revision
master/bt5/slapos_erp5/bt/revision
+1
-1
No files found.
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Sale%20Packing%20List.xml
View file @
e9e11516
...
...
@@ -6,7 +6,7 @@
</role>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Subscription Customer
</property>
<property
id=
'condition'
>
python: here.getSpecialise()
== 'sale_trade_condition_module/slapos_subscription_trade_condition'
</property>
<property
id=
'condition'
>
python: here.getSpecialise()
in ('sale_trade_condition_module/slapos_subscription_trade_condition', 'sale_trade_condition_module/slapos_aggregated_trade_condition')
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'base_category'
>
destination_decision
</multi_property>
</role>
...
...
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5GroupRoleSecurity.py
View file @
e9e11516
...
...
@@ -847,6 +847,23 @@ class TestSalePackingList(TestSlapOSGroupRoleSecurityMixin):
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
product
,
reference
,
[
'Auditor'
])
def
test_GroupCustomerAggregation
(
self
):
reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
reference
)
product
=
self
.
portal
.
sale_packing_list_module
.
newContent
(
portal_type
=
'Sale Packing List'
,
destination_decision_value
=
person
,
specialise_value
=
self
.
portal
.
sale_trade_condition_module
.
\
slapos_aggregated_trade_condition
,
)
product
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
product
,
[
'G-COMPANY'
,
self
.
user_id
,
reference
],
False
)
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
product
,
reference
,
[
'Auditor'
])
class
TestAccountingTransactionModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
module
=
self
.
portal
.
accounting_module
...
...
master/bt5/slapos_erp5/bt/revision
View file @
e9e11516
161
\ No newline at end of file
162
\ No newline at end of file
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