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
4468c60d
Commit
4468c60d
authored
Jan 12, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: fix Accounting Period security
parent
a7d72f2d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Accounting%20Period.xml
..._erp5/PortalTypeRolesTemplateItem/Accounting%20Period.xml
+9
-2
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
...l_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
+4
-3
No files found.
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Accounting%20Period.xml
View file @
4468c60d
<type_roles>
<type_roles>
<role
id=
'Assignee'
>
<property
id=
'title'
>
Accountant Agent
</property>
<multi_property
id=
'categories'
>
local_role_group/function
</multi_property>
<multi_property
id=
'category'
>
function/accounting/agent
</multi_property>
<multi_property
id=
'base_category'
>
function
</multi_property>
</role>
<role
id=
'Assignor'
>
<role
id=
'Assignor'
>
<property
id=
'title'
>
Accountant
</property>
<property
id=
'title'
>
Accountant Manager
</property>
<property
id=
'description'
>
Only the accountant can validate new accounts.
</property>
<multi_property
id=
'categories'
>
local_role_group/function
</multi_property>
<multi_property
id=
'categories'
>
local_role_group/function
</multi_property>
<multi_property
id=
'category'
>
function/accounting
</multi_property>
<multi_property
id=
'category'
>
function/accounting
/manager
</multi_property>
<multi_property
id=
'base_category'
>
function
</multi_property>
<multi_property
id=
'base_category'
>
function
</multi_property>
</role>
</role>
</type_roles>
</type_roles>
\ No newline at end of file
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
View file @
4468c60d
...
@@ -1502,14 +1502,15 @@ class TestSaleTradeCondition(TestSlapOSGroupRoleSecurityMixin):
...
@@ -1502,14 +1502,15 @@ class TestSaleTradeCondition(TestSlapOSGroupRoleSecurityMixin):
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
class
TestAccountingPeriod
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestAccountingPeriod
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_
GroupCompany
(
self
):
def
test_
AccountingFunction
(
self
):
product
=
self
.
portal
.
organisation_module
.
newContent
(
product
=
self
.
portal
.
organisation_module
.
newContent
(
portal_type
=
'Organisation'
).
newContent
(
portal_type
=
'Organisation'
).
newContent
(
portal_type
=
'Accounting Period'
)
portal_type
=
'Accounting Period'
)
product
.
updateLocalRolesOnSecurityGroups
()
product
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
product
,
self
.
assertSecurityGroup
(
product
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
[
'F-ACCMAN'
,
'F-ACCAGT'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
'F-ACCMAN'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
'F-ACCAGT'
,
[
'Assignee'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
class
TestAcknowledgement
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestAcknowledgement
(
TestSlapOSGroupRoleSecurityMixin
):
...
...
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