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
5cee4250
Commit
5cee4250
authored
Nov 03, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: test Document Ingestion Module local roles
parent
5a8b805e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
8 deletions
+18
-8
master/bt5/slapos_erp5/LocalRolesTemplateItem/document_ingestion_module.xml
...erp5/LocalRolesTemplateItem/document_ingestion_module.xml
+4
-4
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Document%20Ingestion%20Module.xml
...alTypeRolesTemplateItem/Document%20Ingestion%20Module.xml
+4
-4
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
...l_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
+10
-0
No files found.
master/bt5/slapos_erp5/LocalRolesTemplateItem/document_ingestion_module.xml
View file @
5cee4250
<local_roles_item>
<local_roles_item>
<local_roles>
<local_roles>
<role
id=
'
G-COMPANY
'
>
<role
id=
'
F-ACCOUNTING*
'
>
<item>
Auditor
</item>
<item>
Auditor
</item>
<item>
Author
</item>
<item>
Author
</item>
</role>
</role>
</local_roles>
</local_roles>
<local_role_group_ids>
<local_role_group_ids>
<local_role_group_id
id=
'
group
'
>
<local_role_group_id
id=
'
function
'
>
<principal
id=
'
G-COMPANY
'
>
Auditor
</principal>
<principal
id=
'
F-ACCOUNTING*
'
>
Auditor
</principal>
<principal
id=
'
G-COMPANY
'
>
Author
</principal>
<principal
id=
'
F-ACCOUNTING*
'
>
Author
</principal>
</local_role_group_id>
</local_role_group_id>
</local_role_group_ids>
</local_role_group_ids>
</local_roles_item>
</local_roles_item>
\ No newline at end of file
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Document%20Ingestion%20Module.xml
View file @
5cee4250
<type_roles>
<type_roles>
<role
id=
'Author; Auditor'
>
<role
id=
'Author; Auditor'
>
<property
id=
'title'
>
Group company
</property>
<property
id=
'title'
>
Accountant
</property>
<multi_property
id=
'categories'
>
local_role_group/
group
</multi_property>
<multi_property
id=
'categories'
>
local_role_group/
function
</multi_property>
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'category'
>
function/accounting*
</multi_property>
<multi_property
id=
'base_category'
>
group
</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 @
5cee4250
...
@@ -1872,6 +1872,16 @@ class TestCertificateLogin(TestSlapOSGroupRoleSecurityMixin):
...
@@ -1872,6 +1872,16 @@ class TestCertificateLogin(TestSlapOSGroupRoleSecurityMixin):
self
.
assertRoles
(
delivery
,
compute_node
.
getUserId
(),
[
'Assignor'
])
self
.
assertRoles
(
delivery
,
compute_node
.
getUserId
(),
[
'Assignor'
])
class
TestDocumentIngestionModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_DocumentIngestionModule
(
self
):
module
=
self
.
portal
.
document_ingestion_module
# XXX Why does it acquire local roles
self
.
assertSecurityGroup
(
module
,
[
'F-ACCOUNTING*'
,
module
.
Base_getOwnerId
()],
True
)
self
.
assertRoles
(
module
,
'F-ACCOUNTING*'
,
[
'Auditor'
,
'Author'
])
self
.
assertRoles
(
module
,
module
.
Base_getOwnerId
(),
[
'Owner'
])
class
TestDocumentModule
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestDocumentModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_DocumentModule
(
self
):
def
test_DocumentModule
(
self
):
module
=
self
.
portal
.
document_module
module
=
self
.
portal
.
document_module
...
...
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