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
Gabriel Monnerat
slapos.core
Commits
30249f8e
Commit
30249f8e
authored
Nov 12, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate accounting module security.
Drop user access for now.
parent
a60236d2
Changes
20
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
89 additions
and
49 deletions
+89
-49
master/bt5/slapos_erp5/LocalRolesTemplateItem/accounting_module.xml
.../slapos_erp5/LocalRolesTemplateItem/accounting_module.xml
+0
-4
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Accounting%20Transaction%20Module.xml
...peRolesTemplateItem/Accounting%20Transaction%20Module.xml
+0
-5
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Accounting%20Transaction.xml
.../PortalTypeRolesTemplateItem/Accounting%20Transaction.xml
+0
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Balance%20Transaction.xml
...rp5/PortalTypeRolesTemplateItem/Balance%20Transaction.xml
+0
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Payment%20Transaction.xml
...rp5/PortalTypeRolesTemplateItem/Payment%20Transaction.xml
+0
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Purchase%20Invoice%20Transaction.xml
...ypeRolesTemplateItem/Purchase%20Invoice%20Transaction.xml
+7
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Sale%20Invoice%20Transaction.xml
...talTypeRolesTemplateItem/Sale%20Invoice%20Transaction.xml
+7
-0
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5GroupRoleSecurity.py
..._erp5/TestTemplateItem/testSlapOSERP5GroupRoleSecurity.py
+59
-0
master/bt5/slapos_erp5/bt/revision
master/bt5/slapos_erp5/bt/revision
+1
-1
master/bt5/slapos_erp5/bt/template_local_role_list
master/bt5/slapos_erp5/bt/template_local_role_list
+1
-0
master/bt5/slapos_erp5/bt/template_local_roles_list
master/bt5/slapos_erp5/bt/template_local_roles_list
+1
-0
master/bt5/slapos_erp5/bt/template_portal_type_role_list
master/bt5/slapos_erp5/bt/template_portal_type_role_list
+6
-0
master/bt5/slapos_erp5/bt/template_portal_type_roles_list
master/bt5/slapos_erp5/bt/template_portal_type_roles_list
+6
-0
master/bt5/vifib_erp5/PortalTypeRolesTemplateItem/Payment%20Transaction.xml
...rp5/PortalTypeRolesTemplateItem/Payment%20Transaction.xml
+0
-12
master/bt5/vifib_erp5/PortalTypeRolesTemplateItem/Sale%20Invoice%20Transaction.xml
...talTypeRolesTemplateItem/Sale%20Invoice%20Transaction.xml
+0
-12
master/bt5/vifib_erp5/bt/revision
master/bt5/vifib_erp5/bt/revision
+1
-1
master/bt5/vifib_erp5/bt/template_local_role_list
master/bt5/vifib_erp5/bt/template_local_role_list
+0
-1
master/bt5/vifib_erp5/bt/template_local_roles_list
master/bt5/vifib_erp5/bt/template_local_roles_list
+0
-1
master/bt5/vifib_erp5/bt/template_portal_type_role_list
master/bt5/vifib_erp5/bt/template_portal_type_role_list
+0
-6
master/bt5/vifib_erp5/bt/template_portal_type_roles_list
master/bt5/vifib_erp5/bt/template_portal_type_roles_list
+0
-6
No files found.
master/bt5/
vifib
_erp5/LocalRolesTemplateItem/accounting_module.xml
→
master/bt5/
slapos
_erp5/LocalRolesTemplateItem/accounting_module.xml
View file @
30249f8e
...
...
@@ -4,10 +4,6 @@
<item>
Auditor
</item>
<item>
Author
</item>
</role>
<role
id=
'R-MEMBER'
>
<item>
Auditor
</item>
<item>
Author
</item>
</role>
<role
id=
'zope'
>
<item>
Owner
</item>
</role>
...
...
master/bt5/
vifib
_erp5/PortalTypeRolesTemplateItem/Accounting%20Transaction%20Module.xml
→
master/bt5/
slapos
_erp5/PortalTypeRolesTemplateItem/Accounting%20Transaction%20Module.xml
View file @
30249f8e
...
...
@@ -4,9 +4,4 @@
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'base_category'
>
group
</multi_property>
</role>
<role
id=
'Author; Auditor'
>
<property
id=
'title'
>
Member
</property>
<multi_property
id=
'category'
>
role/member
</multi_property>
<multi_property
id=
'base_category'
>
role
</multi_property>
</role>
</type_roles>
\ No newline at end of file
master/bt5/
vifib
_erp5/PortalTypeRolesTemplateItem/Accounting%20Transaction.xml
→
master/bt5/
slapos
_erp5/PortalTypeRolesTemplateItem/Accounting%20Transaction.xml
View file @
30249f8e
File moved
master/bt5/
vifib
_erp5/PortalTypeRolesTemplateItem/Balance%20Transaction.xml
→
master/bt5/
slapos
_erp5/PortalTypeRolesTemplateItem/Balance%20Transaction.xml
View file @
30249f8e
File moved
master/bt5/
vifib_erp5/PortalTypeRolesTemplateItem/Purchase%20Invoice
%20Transaction.xml
→
master/bt5/
slapos_erp5/PortalTypeRolesTemplateItem/Payment
%20Transaction.xml
View file @
30249f8e
File moved
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Purchase%20Invoice%20Transaction.xml
0 → 100644
View file @
30249f8e
<type_roles>
<role
id=
'Assignor'
>
<property
id=
'title'
>
Group company
</property>
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'base_category'
>
group
</multi_property>
</role>
</type_roles>
\ No newline at end of file
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Sale%20Invoice%20Transaction.xml
0 → 100644
View file @
30249f8e
<type_roles>
<role
id=
'Assignor'
>
<property
id=
'title'
>
Group company
</property>
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'base_category'
>
group
</multi_property>
</role>
</type_roles>
\ No newline at end of file
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5GroupRoleSecurity.py
View file @
30249f8e
...
...
@@ -803,3 +803,62 @@ class TestSalePackingList(TestSlapOSGroupRoleSecurityMixin):
[
'G-COMPANY'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
class
TestAccountingTransactionModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
module
=
self
.
portal
.
accounting_module
self
.
assertSecurityGroup
(
module
,
[
'G-COMPANY'
,
'zope'
],
True
)
self
.
assertRoles
(
module
,
'G-COMPANY'
,
[
'Auditor'
,
'Author'
])
self
.
assertRoles
(
module
,
'zope'
,
[
'Owner'
])
class
TestAccountingTransaction
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_GroupCompany
(
self
):
product
=
self
.
portal
.
accounting_module
.
newContent
(
portal_type
=
'Accounting Transaction'
)
product
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
product
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
class
TestBalanceTransaction
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_GroupCompany
(
self
):
product
=
self
.
portal
.
accounting_module
.
newContent
(
portal_type
=
'Balance Transaction'
)
product
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
product
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
class
TestPaymentTransaction
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_GroupCompany
(
self
):
product
=
self
.
portal
.
accounting_module
.
newContent
(
portal_type
=
'Payment Transaction'
)
product
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
product
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
class
TestPurchaseInvoiceTransaction
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_GroupCompany
(
self
):
product
=
self
.
portal
.
accounting_module
.
newContent
(
portal_type
=
'Purchase Invoice Transaction'
)
product
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
product
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
class
TestSaleInvoiceTransaction
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_GroupCompany
(
self
):
product
=
self
.
portal
.
accounting_module
.
newContent
(
portal_type
=
'Sale Invoice Transaction'
)
product
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
product
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
master/bt5/slapos_erp5/bt/revision
View file @
30249f8e
82
\ No newline at end of file
83
\ No newline at end of file
master/bt5/slapos_erp5/bt/template_local_role_list
View file @
30249f8e
accounting_module
computer_model_module
computer_module
computer_network_module
...
...
master/bt5/slapos_erp5/bt/template_local_roles_list
View file @
30249f8e
accounting_module
computer_model_module
computer_module
computer_network_module
...
...
master/bt5/slapos_erp5/bt/template_portal_type_role_list
View file @
30249f8e
Accounting Transaction
Accounting Transaction Module
Assignment
Balance Transaction
Computer
Computer Model
Computer Model Module
...
...
@@ -22,9 +25,12 @@ Open Sale Order Module
Organisation
Organisation Module
PDF
Payment Transaction
Person
Person Module
Presentation
Purchase Invoice Transaction
Sale Invoice Transaction
Sale Order
Sale Order Module
Sale Packing List
...
...
master/bt5/slapos_erp5/bt/template_portal_type_roles_list
View file @
30249f8e
Accounting Transaction
Accounting Transaction Module
Assignment
Balance Transaction
Computer
Computer Model
Computer Model Module
...
...
@@ -22,9 +25,12 @@ Open Sale Order Module
Organisation
Organisation Module
PDF
Payment Transaction
Person
Person Module
Presentation
Purchase Invoice Transaction
Sale Invoice Transaction
Sale Order
Sale Order Module
Sale Packing List
...
...
master/bt5/vifib_erp5/PortalTypeRolesTemplateItem/Payment%20Transaction.xml
deleted
100644 → 0
View file @
a60236d2
<type_roles>
<role
id=
'Assignor; Assignee'
>
<property
id=
'title'
>
Group company
</property>
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'base_category'
>
group
</multi_property>
</role>
<role
id=
'Associate'
>
<property
id=
'title'
>
User
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'base_category'
>
destination_section
</multi_property>
</role>
</type_roles>
\ No newline at end of file
master/bt5/vifib_erp5/PortalTypeRolesTemplateItem/Sale%20Invoice%20Transaction.xml
deleted
100644 → 0
View file @
a60236d2
<type_roles>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Destination Section is auditor
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'base_category'
>
destination_section
</multi_property>
</role>
<role
id=
'Assignor'
>
<property
id=
'title'
>
Group company
</property>
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'base_category'
>
group
</multi_property>
</role>
</type_roles>
\ No newline at end of file
master/bt5/vifib_erp5/bt/revision
View file @
30249f8e
559
\ No newline at end of file
560
\ No newline at end of file
master/bt5/vifib_erp5/bt/template_local_role_list
View file @
30249f8e
...
...
@@ -10,7 +10,6 @@ account_module/purchase
account_module/receivable
account_module/refundable_vat
account_module/sales
accounting_module
business_process_module
business_process_module/vifib_purchase_business_process
business_process_module/vifib_sale_business_process
...
...
master/bt5/vifib_erp5/bt/template_local_roles_list
View file @
30249f8e
...
...
@@ -10,7 +10,6 @@ account_module/purchase
account_module/receivable
account_module/refundable_vat
account_module/sales
accounting_module
business_process_module
business_process_module/vifib_purchase_business_process
business_process_module/vifib_sale_business_process
...
...
master/bt5/vifib_erp5/bt/template_portal_type_role_list
View file @
30249f8e
Account
Account Module
Accounting Period
Accounting Transaction
Accounting Transaction Module
Acknowledgement
Balance Transaction
Bank Account
Business Process
Business Process Module
...
...
@@ -37,12 +34,10 @@ Meeting Module
Note
Notification Message
Notification Message Module
Payment Transaction
Payzen Event
Phone Call
Product
Product Module
Purchase Invoice Transaction
Purchase Order
Purchase Order Module
Purchase Packing List
...
...
@@ -51,7 +46,6 @@ Purchase Trade Condition
Purchase Trade Condition Module
Query
Query Module
Sale Invoice Transaction
Sale Opportunity
Sale Opportunity Module
Sale Trade Condition
...
...
master/bt5/vifib_erp5/bt/template_portal_type_roles_list
View file @
30249f8e
Account
Account Module
Accounting Period
Accounting Transaction
Accounting Transaction Module
Acknowledgement
Balance Transaction
Bank Account
Business Process
Business Process Module
...
...
@@ -37,12 +34,10 @@ Meeting Module
Note
Notification Message
Notification Message Module
Payment Transaction
Payzen Event
Phone Call
Product
Product Module
Purchase Invoice Transaction
Purchase Order
Purchase Order Module
Purchase Packing List
...
...
@@ -51,7 +46,6 @@ Purchase Trade Condition
Purchase Trade Condition Module
Query
Query Module
Sale Invoice Transaction
Sale Opportunity
Sale Opportunity Module
Sale Trade Condition
...
...
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