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
Łukasz Nowak
slapos.core
Commits
1782abcf
Commit
1782abcf
authored
Feb 11, 2021
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: Remove unecessary Security
Those documents are expected to be published when they are accessible
parent
088ae63e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
38 deletions
+21
-38
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Currency.xml
.../bt5/slapos_erp5/PortalTypeRolesTemplateItem/Currency.xml
+0
-6
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Software%20Product.xml
...s_erp5/PortalTypeRolesTemplateItem/Software%20Product.xml
+0
-6
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Software%20Release.xml
...s_erp5/PortalTypeRolesTemplateItem/Software%20Release.xml
+0
-6
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
...l_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
+21
-20
No files found.
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Currency.xml
View file @
1782abcf
...
@@ -5,12 +5,6 @@
...
@@ -5,12 +5,6 @@
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'base_category'
>
group
</multi_property>
<multi_property
id=
'base_category'
>
group
</multi_property>
</role>
</role>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Member
</property>
<multi_property
id=
'categories'
>
local_role_group/user
</multi_property>
<multi_property
id=
'category'
>
role/member
</multi_property>
<multi_property
id=
'base_category'
>
role
</multi_property>
</role>
<role
id=
'Auditor'
>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Person Shadow
</property>
<property
id=
'title'
>
Person Shadow
</property>
<multi_property
id=
'categories'
>
local_role_group/shadow
</multi_property>
<multi_property
id=
'categories'
>
local_role_group/shadow
</multi_property>
...
...
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Software%20Product.xml
View file @
1782abcf
...
@@ -5,10 +5,4 @@
...
@@ -5,10 +5,4 @@
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'base_category'
>
group
</multi_property>
<multi_property
id=
'base_category'
>
group
</multi_property>
</role>
</role>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Member
</property>
<multi_property
id=
'categories'
>
local_role_group/user
</multi_property>
<multi_property
id=
'category'
>
role/member
</multi_property>
<multi_property
id=
'base_category'
>
role
</multi_property>
</role>
</type_roles>
</type_roles>
\ No newline at end of file
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Software%20Release.xml
View file @
1782abcf
...
@@ -5,10 +5,4 @@
...
@@ -5,10 +5,4 @@
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'base_category'
>
group
</multi_property>
<multi_property
id=
'base_category'
>
group
</multi_property>
</role>
</role>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Member
</property>
<multi_property
id=
'categories'
>
local_role_group/user
</multi_property>
<multi_property
id=
'category'
>
role/member
</multi_property>
<multi_property
id=
'base_category'
>
role
</multi_property>
</role>
</type_roles>
</type_roles>
\ No newline at end of file
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
View file @
1782abcf
...
@@ -426,10 +426,7 @@ class TestImageModule(TestSlapOSGroupRoleSecurityMixin):
...
@@ -426,10 +426,7 @@ class TestImageModule(TestSlapOSGroupRoleSecurityMixin):
module
=
self
.
portal
.
image_module
module
=
self
.
portal
.
image_module
self
.
changeOwnership
(
module
)
self
.
changeOwnership
(
module
)
self
.
assertSecurityGroup
(
module
,
self
.
assertSecurityGroup
(
module
,
[
'R-COMPUTER'
,
'R-INSTANCE'
,
'R-MEMBER'
,
self
.
user_id
,
'G-COMPANY'
],
False
)
[
self
.
user_id
,
'G-COMPANY'
],
False
)
self
.
assertRoles
(
module
,
'R-COMPUTER'
,
[
'Author'
])
self
.
assertRoles
(
module
,
'R-INSTANCE'
,
[
'Author'
])
self
.
assertRoles
(
module
,
'R-MEMBER'
,
[
'Author'
])
self
.
assertRoles
(
module
,
'G-COMPANY'
,
[
'Author'
,
'Auditor'
])
self
.
assertRoles
(
module
,
'G-COMPANY'
,
[
'Author'
,
'Auditor'
])
self
.
assertRoles
(
module
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
module
,
self
.
user_id
,
[
'Owner'
])
...
@@ -831,9 +828,8 @@ class TestSoftwareProduct(TestSlapOSGroupRoleSecurityMixin):
...
@@ -831,9 +828,8 @@ class TestSoftwareProduct(TestSlapOSGroupRoleSecurityMixin):
portal_type
=
'Software Product'
)
portal_type
=
'Software Product'
)
product
.
updateLocalRolesOnSecurityGroups
()
product
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
product
,
self
.
assertSecurityGroup
(
product
,
[
'G-COMPANY'
,
'R-MEMBER'
,
self
.
user_id
],
False
)
[
'G-COMPANY'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
'R-MEMBER'
,
[
'Auditor'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
class
TestSoftwareProductModule
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestSoftwareProductModule
(
TestSlapOSGroupRoleSecurityMixin
):
...
@@ -852,9 +848,8 @@ class TestSoftwareRelease(TestSlapOSGroupRoleSecurityMixin):
...
@@ -852,9 +848,8 @@ class TestSoftwareRelease(TestSlapOSGroupRoleSecurityMixin):
portal_type
=
'Software Release'
)
portal_type
=
'Software Release'
)
release
.
updateLocalRolesOnSecurityGroups
()
release
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
release
,
self
.
assertSecurityGroup
(
release
,
[
'G-COMPANY'
,
'R-MEMBER'
,
self
.
user_id
],
False
)
[
'G-COMPANY'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
release
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
release
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
release
,
'R-MEMBER'
,
[
'Auditor'
])
self
.
assertRoles
(
release
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
release
,
self
.
user_id
,
[
'Owner'
])
class
TestSoftwareReleaseModule
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestSoftwareReleaseModule
(
TestSlapOSGroupRoleSecurityMixin
):
...
@@ -1159,10 +1154,9 @@ class TestAccountModule(TestSlapOSGroupRoleSecurityMixin):
...
@@ -1159,10 +1154,9 @@ class TestAccountModule(TestSlapOSGroupRoleSecurityMixin):
module
=
self
.
portal
.
account_module
module
=
self
.
portal
.
account_module
self
.
changeOwnership
(
module
)
self
.
changeOwnership
(
module
)
self
.
assertSecurityGroup
(
module
,
self
.
assertSecurityGroup
(
module
,
[
'G-COMPANY'
,
self
.
user_id
,
'R-SHADOW-PERSON'
,
'R-MEMBER'
],
False
)
[
'G-COMPANY'
,
self
.
user_id
,
'R-SHADOW-PERSON'
],
False
)
self
.
assertRoles
(
module
,
'G-COMPANY'
,
[
'Auditor'
,
'Author'
])
self
.
assertRoles
(
module
,
'G-COMPANY'
,
[
'Auditor'
,
'Author'
])
self
.
assertRoles
(
module
,
'R-SHADOW-PERSON'
,
[
'Auditor'
])
self
.
assertRoles
(
module
,
'R-SHADOW-PERSON'
,
[
'Auditor'
])
self
.
assertRoles
(
module
,
'R-MEMBER'
,
[
'Auditor'
])
self
.
assertRoles
(
module
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
module
,
self
.
user_id
,
[
'Owner'
])
class
TestAccount
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestAccount
(
TestSlapOSGroupRoleSecurityMixin
):
...
@@ -1171,10 +1165,9 @@ class TestAccount(TestSlapOSGroupRoleSecurityMixin):
...
@@ -1171,10 +1165,9 @@ class TestAccount(TestSlapOSGroupRoleSecurityMixin):
portal_type
=
'Account'
)
portal_type
=
'Account'
)
product
.
updateLocalRolesOnSecurityGroups
()
product
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
product
,
self
.
assertSecurityGroup
(
product
,
[
'G-COMPANY'
,
self
.
user_id
,
'R-SHADOW-PERSON'
,
'R-MEMBER'
],
False
)
[
'G-COMPANY'
,
self
.
user_id
,
'R-SHADOW-PERSON'
],
False
)
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
'R-SHADOW-PERSON'
,
[
'Auditor'
])
self
.
assertRoles
(
product
,
'R-SHADOW-PERSON'
,
[
'Auditor'
])
self
.
assertRoles
(
product
,
'R-MEMBER'
,
[
'Auditor'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
class
TestCurrencyModule
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestCurrencyModule
(
TestSlapOSGroupRoleSecurityMixin
):
...
@@ -1194,10 +1187,9 @@ class TestCurrency(TestSlapOSGroupRoleSecurityMixin):
...
@@ -1194,10 +1187,9 @@ class TestCurrency(TestSlapOSGroupRoleSecurityMixin):
portal_type
=
'Currency'
)
portal_type
=
'Currency'
)
product
.
updateLocalRolesOnSecurityGroups
()
product
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
product
,
self
.
assertSecurityGroup
(
product
,
[
'G-COMPANY'
,
self
.
user_id
,
'R-SHADOW-PERSON'
,
'R-MEMBER'
],
False
)
[
'G-COMPANY'
,
self
.
user_id
,
'R-SHADOW-PERSON'
],
False
)
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
'R-SHADOW-PERSON'
,
[
'Auditor'
])
self
.
assertRoles
(
product
,
'R-SHADOW-PERSON'
,
[
'Auditor'
])
self
.
assertRoles
(
product
,
'R-MEMBER'
,
[
'Auditor'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
class
TestSaleTradeConditionModule
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestSaleTradeConditionModule
(
TestSlapOSGroupRoleSecurityMixin
):
...
@@ -1216,9 +1208,9 @@ class TestSaleTradeCondition(TestSlapOSGroupRoleSecurityMixin):
...
@@ -1216,9 +1208,9 @@ class TestSaleTradeCondition(TestSlapOSGroupRoleSecurityMixin):
portal_type
=
'Sale Trade Condition'
)
portal_type
=
'Sale Trade Condition'
)
product
.
updateLocalRolesOnSecurityGroups
()
product
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
product
,
self
.
assertSecurityGroup
(
product
,
[
'G-COMPANY'
,
self
.
user_id
,
'R-
MEMBER
'
],
False
)
[
'G-COMPANY'
,
self
.
user_id
,
'R-
SHADOW-PERSON
'
],
False
)
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
'R-
MEMBER
'
,
[
'Auditor'
])
self
.
assertRoles
(
product
,
'R-
SHADOW-PERSON
'
,
[
'Auditor'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
class
TestAccountingPeriod
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestAccountingPeriod
(
TestSlapOSGroupRoleSecurityMixin
):
...
@@ -2140,9 +2132,9 @@ class TestBusinessProcess(TestSlapOSGroupRoleSecurityMixin):
...
@@ -2140,9 +2132,9 @@ class TestBusinessProcess(TestSlapOSGroupRoleSecurityMixin):
portal_type
=
'Business Process'
)
portal_type
=
'Business Process'
)
product
.
updateLocalRolesOnSecurityGroups
()
product
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
product
,
self
.
assertSecurityGroup
(
product
,
[
'G-COMPANY'
,
self
.
user_id
,
'R-
MEMBER
'
],
False
)
[
'G-COMPANY'
,
self
.
user_id
,
'R-
SHADOW-PERSON
'
],
False
)
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Auditor'
])
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Auditor'
])
self
.
assertRoles
(
product
,
'R-
MEMBER
'
,
[
'Auditor'
])
self
.
assertRoles
(
product
,
'R-
SHADOW-PERSON
'
,
[
'Auditor'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
class
TestRegularisationRequestModule
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestRegularisationRequestModule
(
TestSlapOSGroupRoleSecurityMixin
):
...
@@ -2198,11 +2190,20 @@ class TestInvitationTokenModule(TestSlapOSGroupRoleSecurityMixin):
...
@@ -2198,11 +2190,20 @@ class TestInvitationTokenModule(TestSlapOSGroupRoleSecurityMixin):
module
=
self
.
portal
.
invitation_token_module
module
=
self
.
portal
.
invitation_token_module
self
.
changeOwnership
(
module
)
self
.
changeOwnership
(
module
)
self
.
assertSecurityGroup
(
module
,
self
.
assertSecurityGroup
(
module
,
[
'G-COMPANY'
,
'R-MEMBER'
,
self
.
user_id
],
False
)
[
'G-COMPANY'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
module
,
'G-COMPANY'
,
[
'Auditor'
,
'Author'
])
self
.
assertRoles
(
module
,
'G-COMPANY'
,
[
'Auditor'
,
'Author'
])
self
.
assertRoles
(
module
,
'R-MEMBER'
,
[
'Author'
])
self
.
assertRoles
(
module
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
module
,
self
.
user_id
,
[
'Owner'
])
class
TestContractInvitationToken
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_GroupCompany
(
self
):
product
=
self
.
portal
.
invitation_token_module
.
newContent
(
portal_type
=
'Contract Invitation Token'
)
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
TestAccessTokenModule
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestAccessTokenModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
def
test
(
self
):
module
=
self
.
portal
.
access_token_module
module
=
self
.
portal
.
access_token_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