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
c4348d84
Commit
c4348d84
authored
Jul 20, 2023
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: Drop ERP5 Login from instance and compute node
parent
693c8c5c
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
55 additions
and
205 deletions
+55
-205
master/bt5/slapos_cloud/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
...eAllowedContentTypeTemplateItem/allowed_content_types.xml
+0
-2
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.SlapOSTestCaseMixin.py
...teItem/portal_components/test.erp5.SlapOSTestCaseMixin.py
+8
-0
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloud.py
...mplateItem/portal_components/test.erp5.testSlapOSCloud.py
+1
-2
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudComputePartitionSlapInterfaceWorkflow.py
...5.testSlapOSCloudComputePartitionSlapInterfaceWorkflow.py
+1
-1
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudComputePartitionSlapInterfaceWorkflow.xml
....testSlapOSCloudComputePartitionSlapInterfaceWorkflow.xml
+3
-24
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudInteractionWorkflow.py
...omponents/test.erp5.testSlapOSCloudInteractionWorkflow.py
+3
-3
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudInteractionWorkflow.xml
...mponents/test.erp5.testSlapOSCloudInteractionWorkflow.xml
+3
-24
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudSecurityGroup.py
...rtal_components/test.erp5.testSlapOSCloudSecurityGroup.py
+0
-12
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudSecurityGroup.xml
...tal_components/test.erp5.testSlapOSCloudSecurityGroup.xml
+3
-24
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudShadow.py
...Item/portal_components/test.erp5.testSlapOSCloudShadow.py
+2
-2
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudShadow.xml
...tem/portal_components/test.erp5.testSlapOSCloudShadow.xml
+3
-24
master/bt5/slapos_cloud/bt/template_portal_type_allowed_content_type_list
...s_cloud/bt/template_portal_type_allowed_content_type_list
+1
-3
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSAuthenticationPolicy.py
...al_components/test.erp5.testSlapOSAuthenticationPolicy.py
+0
-22
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSAuthenticationPolicy.xml
...l_components/test.erp5.testSlapOSAuthenticationPolicy.xml
+3
-24
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
...l_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
+23
-36
master/bt5/slapos_slap_tool/TestTemplateItem/portal_components/test.erp5.testSlapOSSlapTool.py
...ateItem/portal_components/test.erp5.testSlapOSSlapTool.py
+1
-2
No files found.
master/bt5/slapos_cloud/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
View file @
c4348d84
<allowed_content_type_list>
<allowed_content_type_list>
<portal_type
id=
"Compute Node"
>
<portal_type
id=
"Compute Node"
>
<item>
Certificate Login
</item>
<item>
Certificate Login
</item>
<item>
ERP5 Login
</item>
</portal_type>
</portal_type>
<portal_type
id=
"Hosting Subscription Module"
>
<portal_type
id=
"Hosting Subscription Module"
>
<item>
Hosting Subscription
</item>
<item>
Hosting Subscription
</item>
...
@@ -14,7 +13,6 @@
...
@@ -14,7 +13,6 @@
</portal_type>
</portal_type>
<portal_type
id=
"Software Instance"
>
<portal_type
id=
"Software Instance"
>
<item>
Certificate Login
</item>
<item>
Certificate Login
</item>
<item>
ERP5 Login
</item>
</portal_type>
</portal_type>
<portal_type
id=
"Software Instance Module"
>
<portal_type
id=
"Software Instance Module"
>
<item>
Slave Instance
</item>
<item>
Slave Instance
</item>
...
...
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.SlapOSTestCaseMixin.py
View file @
c4348d84
...
@@ -202,6 +202,14 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
...
@@ -202,6 +202,14 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
login
.
validate
()
login
.
validate
()
return
login
return
login
def
_addCertificateLogin
(
self
,
document
,
**
kw
):
login
=
document
.
newContent
(
portal_type
=
"Certificate Login"
,
reference
=
document
.
getReference
(),
**
kw
)
login
.
validate
()
return
login
def
makePerson
(
self
,
new_id
=
None
,
index
=
True
,
user
=
True
):
def
makePerson
(
self
,
new_id
=
None
,
index
=
True
,
user
=
True
):
if
new_id
is
None
:
if
new_id
is
None
:
...
...
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloud.py
View file @
c4348d84
...
@@ -502,8 +502,7 @@ class TestSlapOSCloudSlapOSComputeNodeMixin_getCacheComputeNodeInformation(
...
@@ -502,8 +502,7 @@ class TestSlapOSCloudSlapOSComputeNodeMixin_getCacheComputeNodeInformation(
source_administration_value
=
getattr
(
self
,
"person"
,
None
),
source_administration_value
=
getattr
(
self
,
"person"
,
None
),
)
)
self
.
compute_node
.
validate
()
self
.
compute_node
.
validate
()
self
.
_addCertificateLogin
(
self
.
compute_node
)
self
.
_addERP5Login
(
self
.
compute_node
)
self
.
tic
()
self
.
tic
()
...
...
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudComputePartitionSlapInterfaceWorkflow.py
View file @
c4348d84
...
@@ -36,7 +36,7 @@ class TestSlapOSCoreComputePartitionSlapInterfaceWorkflow(SlapOSTestCaseMixin):
...
@@ -36,7 +36,7 @@ class TestSlapOSCoreComputePartitionSlapInterfaceWorkflow(SlapOSTestCaseMixin):
)
)
self
.
compute_node
.
validate
()
self
.
compute_node
.
validate
()
login
=
self
.
compute_node
.
newContent
(
login
=
self
.
compute_node
.
newContent
(
portal_type
=
"
ERP5
Login"
,
portal_type
=
"
Certificate
Login"
,
reference
=
self
.
compute_node
.
getReference
()
reference
=
self
.
compute_node
.
getReference
()
)
)
login
.
validate
()
login
.
validate
()
...
...
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudComputePartitionSlapInterfaceWorkflow.xml
View file @
c4348d84
...
@@ -6,12 +6,6 @@
...
@@ -6,12 +6,6 @@
</pickle>
</pickle>
<pickle>
<pickle>
<dictionary>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
testSlapOSCloudComputePartitionSlapInterfaceWorkflow
</string>
</value>
<value>
<string>
testSlapOSCloudComputePartitionSlapInterfaceWorkflow
</string>
</value>
...
@@ -55,28 +49,13 @@
...
@@ -55,28 +49,13 @@
<item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<key>
<string>
workflow_history
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
</pickle>
...
@@ -89,7 +68,7 @@
...
@@ -89,7 +68,7 @@
<item>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
...
@@ -98,7 +77,7 @@
...
@@ -98,7 +77,7 @@
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
</pickle>
...
...
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudInteractionWorkflow.py
View file @
c4348d84
...
@@ -59,7 +59,7 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
...
@@ -59,7 +59,7 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
specialise_value
=
hs
)
specialise_value
=
hs
)
if
portal_type
==
"Software Instance"
:
if
portal_type
==
"Software Instance"
:
self
.
_add
ERP5
Login
(
instance
)
self
.
_add
Certificate
Login
(
instance
)
self
.
tic
()
self
.
tic
()
def
verify_activeSense_call
(
self
):
def
verify_activeSense_call
(
self
):
...
@@ -130,7 +130,7 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
...
@@ -130,7 +130,7 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
portal_type
=
'Compute Node'
,
portal_type
=
'Compute Node'
,
title
=
"Compute Node %s for %s"
%
(
self
.
new_id
,
self
.
person_user
.
getReference
()),
title
=
"Compute Node %s for %s"
%
(
self
.
new_id
,
self
.
person_user
.
getReference
()),
reference
=
"TESTCOMP-%s"
%
self
.
new_id
)
reference
=
"TESTCOMP-%s"
%
self
.
new_id
)
self
.
_add
ERP5
Login
(
compute_node
)
self
.
_add
Certificate
Login
(
compute_node
)
installation
=
self
.
portal
.
software_installation_module
.
newContent
(
installation
=
self
.
portal
.
software_installation_module
.
newContent
(
portal_type
=
'Software Installation'
,
portal_type
=
'Software Installation'
,
...
@@ -173,7 +173,7 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
...
@@ -173,7 +173,7 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
portal_type
=
'Compute Node'
,
portal_type
=
'Compute Node'
,
title
=
"Compute Node %s for %s"
%
(
new_id
,
self
.
person_user
.
getReference
()),
title
=
"Compute Node %s for %s"
%
(
new_id
,
self
.
person_user
.
getReference
()),
reference
=
"TESTCOMP-%s"
%
new_id
)
reference
=
"TESTCOMP-%s"
%
new_id
)
self
.
_add
ERP5
Login
(
compute_node
)
self
.
_add
Certificate
Login
(
compute_node
)
partition
=
compute_node
.
newContent
(
partition
=
compute_node
.
newContent
(
portal_type
=
'Compute Partition'
,
portal_type
=
'Compute Partition'
,
title
=
"Partition Compute Node %s for %s"
%
(
new_id
,
title
=
"Partition Compute Node %s for %s"
%
(
new_id
,
...
...
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudInteractionWorkflow.xml
View file @
c4348d84
...
@@ -6,12 +6,6 @@
...
@@ -6,12 +6,6 @@
</pickle>
</pickle>
<pickle>
<pickle>
<dictionary>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
testSlapOSCloudInteractionWorkflow
</string>
</value>
<value>
<string>
testSlapOSCloudInteractionWorkflow
</string>
</value>
...
@@ -61,28 +55,13 @@
...
@@ -61,28 +55,13 @@
<item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<key>
<string>
workflow_history
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
</pickle>
...
@@ -95,7 +74,7 @@
...
@@ -95,7 +74,7 @@
<item>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
...
@@ -104,7 +83,7 @@
...
@@ -104,7 +83,7 @@
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
</pickle>
...
...
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudSecurityGroup.py
View file @
c4348d84
...
@@ -117,12 +117,6 @@ class TestSlapOSComputeNodeSecurity(TestSlapOSSecurityMixin):
...
@@ -117,12 +117,6 @@ class TestSlapOSComputeNodeSecurity(TestSlapOSSecurityMixin):
self
.
_assertUserDoesNotExists
(
user_id
,
reference
,
None
)
self
.
_assertUserDoesNotExists
(
user_id
,
reference
,
None
)
def
test_active_backward_compatibility_with_erp5_login
(
self
):
self
.
test_active
(
login_portal_type
=
"ERP5 Login"
)
def
test_inactive_backward_compatibility_with_erp5_login
(
self
):
self
.
test_inactive
(
login_portal_type
=
"ERP5 Login"
)
class
TestSlapOSSoftwareInstanceSecurity
(
TestSlapOSSecurityMixin
):
class
TestSlapOSSoftwareInstanceSecurity
(
TestSlapOSSecurityMixin
):
portal_type
=
'Software Instance'
portal_type
=
'Software Instance'
def
test_active
(
self
,
login_portal_type
=
"Certificate Login"
):
def
test_active
(
self
,
login_portal_type
=
"Certificate Login"
):
...
@@ -175,12 +169,6 @@ class TestSlapOSSoftwareInstanceSecurity(TestSlapOSSecurityMixin):
...
@@ -175,12 +169,6 @@ class TestSlapOSSoftwareInstanceSecurity(TestSlapOSSecurityMixin):
self
.
_assertUserDoesNotExists
(
user_id
,
reference
,
None
)
self
.
_assertUserDoesNotExists
(
user_id
,
reference
,
None
)
def
test_active_backward_compatibility_with_erp5_login
(
self
):
self
.
test_active
(
login_portal_type
=
"ERP5 Login"
)
def
test_inactive_backward_compatibility_with_erp5_login
(
self
):
self
.
test_inactive
(
login_portal_type
=
"ERP5 Login"
)
class
TestSlapOSPersonSecurity
(
TestSlapOSSecurityMixin
):
class
TestSlapOSPersonSecurity
(
TestSlapOSSecurityMixin
):
def
test_active
(
self
,
login_portal_type
=
"Certificate Login"
):
def
test_active
(
self
,
login_portal_type
=
"Certificate Login"
):
...
...
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudSecurityGroup.xml
View file @
c4348d84
...
@@ -6,12 +6,6 @@
...
@@ -6,12 +6,6 @@
</pickle>
</pickle>
<pickle>
<pickle>
<dictionary>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
testSlapOSCloudSecurityGroup
</string>
</value>
<value>
<string>
testSlapOSCloudSecurityGroup
</string>
</value>
...
@@ -55,28 +49,13 @@
...
@@ -55,28 +49,13 @@
<item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<key>
<string>
workflow_history
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
</pickle>
...
@@ -89,7 +68,7 @@
...
@@ -89,7 +68,7 @@
<item>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
...
@@ -98,7 +77,7 @@
...
@@ -98,7 +77,7 @@
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
</pickle>
...
...
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudShadow.py
View file @
c4348d84
...
@@ -84,7 +84,7 @@ class TestSlapOSShadowComputeNode(TestSlapOSSecurityMixin):
...
@@ -84,7 +84,7 @@ class TestSlapOSShadowComputeNode(TestSlapOSSecurityMixin):
reference
=
reference
)
reference
=
reference
)
compute_node
.
setUserId
(
user_id
)
compute_node
.
setUserId
(
user_id
)
compute_node
.
newContent
(
portal_type
=
'
ERP5
Login'
,
compute_node
.
newContent
(
portal_type
=
'
Certificate
Login'
,
reference
=
reference
).
validate
()
reference
=
reference
).
validate
()
compute_node
.
validate
()
compute_node
.
validate
()
...
@@ -125,7 +125,7 @@ class TestSlapOSShadowSoftwareInstance(TestSlapOSSecurityMixin):
...
@@ -125,7 +125,7 @@ class TestSlapOSShadowSoftwareInstance(TestSlapOSSecurityMixin):
instance
=
self
.
portal
.
getDefaultModule
(
portal_type
=
self
.
portal_type
)
\
instance
=
self
.
portal
.
getDefaultModule
(
portal_type
=
self
.
portal_type
)
\
.
newContent
(
portal_type
=
self
.
portal_type
,
reference
=
reference
)
.
newContent
(
portal_type
=
self
.
portal_type
,
reference
=
reference
)
instance
.
setUserId
(
user_id
)
instance
.
setUserId
(
user_id
)
instance
.
newContent
(
portal_type
=
'
ERP5
Login'
,
instance
.
newContent
(
portal_type
=
'
Certificate
Login'
,
reference
=
reference
).
validate
()
reference
=
reference
).
validate
()
instance
.
validate
()
instance
.
validate
()
self
.
tic
()
self
.
tic
()
...
...
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudShadow.xml
View file @
c4348d84
...
@@ -6,12 +6,6 @@
...
@@ -6,12 +6,6 @@
</pickle>
</pickle>
<pickle>
<pickle>
<dictionary>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
testSlapOSCloudShadow
</string>
</value>
<value>
<string>
testSlapOSCloudShadow
</string>
</value>
...
@@ -55,28 +49,13 @@
...
@@ -55,28 +49,13 @@
<item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<key>
<string>
workflow_history
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
</pickle>
...
@@ -89,7 +68,7 @@
...
@@ -89,7 +68,7 @@
<item>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
...
@@ -98,7 +77,7 @@
...
@@ -98,7 +77,7 @@
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
</pickle>
...
...
master/bt5/slapos_cloud/bt/template_portal_type_allowed_content_type_list
View file @
c4348d84
Compute Node | Certificate Login
Compute Node | Certificate Login
Compute Node | ERP5 Login
Hosting Subscription Module | Hosting Subscription
Hosting Subscription Module | Hosting Subscription
Instance Tree Module | Instance Tree
Instance Tree Module | Instance Tree
Software Installation Module | Software Installation
Software Installation Module | Software Installation
Software Instance Module | Slave Instance
Software Instance Module | Slave Instance
Software Instance Module | Software Instance
Software Instance Module | Software Instance
Software Instance | Certificate Login
Software Instance | Certificate Login
\ No newline at end of file
Software Instance | ERP5 Login
\ No newline at end of file
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSAuthenticationPolicy.py
View file @
c4348d84
...
@@ -108,17 +108,6 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
...
@@ -108,17 +108,6 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
document
=
person
,
document
=
person
,
login_portal_type
=
"ERP5 Login"
)
login_portal_type
=
"ERP5 Login"
)
def
test_block_ERP5Login_without_password_on_compute_node
(
self
):
self
.
_test_login_block_if_password_is_set
(
document
=
self
.
_makeComputeNode
()[
0
],
login_portal_type
=
"ERP5 Login"
)
def
test_block_ERP5Login_without_password_on_software_instance
(
self
):
self
.
_test_login_block_if_password_is_set
(
document
=
self
.
_makeDummySoftwareInstance
(),
login_portal_type
=
"ERP5 Login"
)
def
test_block_CertificateLogin_without_password_on_person
(
self
):
def
test_block_CertificateLogin_without_password_on_person
(
self
):
person
=
self
.
makePerson
(
user
=
0
)
person
=
self
.
makePerson
(
user
=
0
)
person
.
edit
(
person
.
edit
(
...
@@ -223,17 +212,6 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
...
@@ -223,17 +212,6 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
document
=
person
,
document
=
person
,
login_portal_type
=
"ERP5 Login"
)
login_portal_type
=
"ERP5 Login"
)
def
test_expire_ERP5Login_without_password_on_compute_node
(
self
):
self
.
_test_expire_when_passoword_is_set
(
document
=
self
.
_makeComputeNode
()[
0
],
login_portal_type
=
"ERP5 Login"
)
def
test_expire_ERP5Login_without_password_on_software_instance
(
self
):
self
.
_test_expire_when_passoword_is_set
(
document
=
self
.
_makeDummySoftwareInstance
(),
login_portal_type
=
"ERP5 Login"
)
def
test_expire_CertificateLogin_without_password_on_person
(
self
):
def
test_expire_CertificateLogin_without_password_on_person
(
self
):
person
=
self
.
makePerson
(
user
=
0
)
person
=
self
.
makePerson
(
user
=
0
)
person
.
edit
(
person
.
edit
(
...
...
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSAuthenticationPolicy.xml
View file @
c4348d84
...
@@ -6,12 +6,6 @@
...
@@ -6,12 +6,6 @@
</pickle>
</pickle>
<pickle>
<pickle>
<dictionary>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
testSlapOSAuthenticationPolicy
</string>
</value>
<value>
<string>
testSlapOSAuthenticationPolicy
</string>
</value>
...
@@ -55,28 +49,13 @@
...
@@ -55,28 +49,13 @@
<item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<key>
<string>
workflow_history
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
</pickle>
...
@@ -89,7 +68,7 @@
...
@@ -89,7 +68,7 @@
<item>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
...
@@ -98,7 +77,7 @@
...
@@ -98,7 +77,7 @@
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
</pickle>
...
...
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
View file @
c4348d84
...
@@ -699,28 +699,6 @@ class TestERP5Login(TestSlapOSGroupRoleSecurityMixin):
...
@@ -699,28 +699,6 @@ class TestERP5Login(TestSlapOSGroupRoleSecurityMixin):
self
.
assertRoles
(
login
,
person
.
getUserId
(),
[
'Assignee'
])
self
.
assertRoles
(
login
,
person
.
getUserId
(),
[
'Assignee'
])
self
.
assertRoles
(
login
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
login
,
self
.
user_id
,
[
'Owner'
])
def
test_ComputeNodeCanAccessLoginDocument
(
self
):
compute_node
=
self
.
portal
.
compute_node_module
.
newContent
(
portal_type
=
'Compute Node'
)
login
=
compute_node
.
newContent
(
portal_type
=
self
.
login_portal_type
)
compute_node
.
updateLocalRolesOnSecurityGroups
()
login
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
login
,
[
self
.
user_id
,
compute_node
.
getUserId
()],
False
)
self
.
assertRoles
(
login
,
compute_node
.
getUserId
(),
[
'Assignee'
])
self
.
assertRoles
(
login
,
self
.
user_id
,
[
'Owner'
])
def
test_SoftwareInstanceCanAccessLoginDocument
(
self
):
software_instance
=
self
.
portal
.
software_instance_module
.
newContent
(
portal_type
=
'Software Instance'
)
login
=
software_instance
.
newContent
(
portal_type
=
self
.
login_portal_type
)
software_instance
.
updateLocalRolesOnSecurityGroups
()
login
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
login
,
[
self
.
user_id
,
software_instance
.
getUserId
()],
False
)
self
.
assertRoles
(
login
,
software_instance
.
getUserId
(),
[
'Assignee'
])
self
.
assertRoles
(
login
,
self
.
user_id
,
[
'Owner'
])
class
TestCertificateLogin
(
TestERP5Login
):
class
TestCertificateLogin
(
TestERP5Login
):
login_portal_type
=
"Certificate Login"
login_portal_type
=
"Certificate Login"
...
@@ -744,25 +722,34 @@ class TestCertificateLogin(TestERP5Login):
...
@@ -744,25 +722,34 @@ class TestCertificateLogin(TestERP5Login):
self
.
assertRoles
(
login
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
login
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
login
,
compute_node
.
getUserId
(),
[
'Assignor'
])
self
.
assertRoles
(
login
,
compute_node
.
getUserId
(),
[
'Assignor'
])
class
TestGoogleLogin
(
TestERP5Login
):
login_portal_type
=
"Google Login"
def
test_ComputeNodeCanAccessLoginDocument
(
self
):
def
test_ComputeNodeCanAccessLoginDocument
(
self
):
# Not supported to add google login inside Compute Node
compute_node
=
self
.
portal
.
compute_node_module
.
newContent
(
portal_type
=
'Compute Node'
)
pass
login
=
compute_node
.
newContent
(
portal_type
=
self
.
login_portal_type
)
compute_node
.
updateLocalRolesOnSecurityGroups
()
login
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
login
,
[
self
.
user_id
,
compute_node
.
getUserId
()],
False
)
self
.
assertRoles
(
login
,
compute_node
.
getUserId
(),
[
'Assignee'
])
self
.
assertRoles
(
login
,
self
.
user_id
,
[
'Owner'
])
def
test_SoftwareInstanceCanAccessLoginDocument
(
self
):
def
test_SoftwareInstanceCanAccessLoginDocument
(
self
):
# Not supported to add google login inside SoftwareInstance
software_instance
=
self
.
portal
.
software_instance_module
.
newContent
(
portal_type
=
'Software Instance'
)
pass
login
=
software_instance
.
newContent
(
portal_type
=
self
.
login_portal_type
)
software_instance
.
updateLocalRolesOnSecurityGroups
()
login
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
login
,
[
self
.
user_id
,
software_instance
.
getUserId
()],
False
)
self
.
assertRoles
(
login
,
software_instance
.
getUserId
(),
[
'Assignee'
])
self
.
assertRoles
(
login
,
self
.
user_id
,
[
'Owner'
])
class
TestGoogleLogin
(
TestERP5Login
):
login_portal_type
=
"Google Login"
class
TestFacebookLogin
(
TestERP5Login
):
class
TestFacebookLogin
(
TestERP5Login
):
login_portal_type
=
"Facebook Login"
login_portal_type
=
"Facebook Login"
def
test_ComputeNodeCanAccessLoginDocument
(
self
):
# Not supported to add google login inside Compute Node
pass
def
test_SoftwareInstanceCanAccessLoginDocument
(
self
):
# Not supported to add google login inside SoftwareInstance
pass
class
TestPersonModule
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestPersonModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
def
test
(
self
):
...
...
master/bt5/slapos_slap_tool/TestTemplateItem/portal_components/test.erp5.testSlapOSSlapTool.py
View file @
c4348d84
...
@@ -57,8 +57,7 @@ class TestSlapOSSlapToolMixin(SlapOSTestCaseMixin):
...
@@ -57,8 +57,7 @@ class TestSlapOSSlapToolMixin(SlapOSTestCaseMixin):
source_administration_value
=
getattr
(
self
,
"person"
,
None
),
source_administration_value
=
getattr
(
self
,
"person"
,
None
),
)
)
self
.
compute_node
.
validate
()
self
.
compute_node
.
validate
()
self
.
_addCertificateLogin
(
self
.
compute_node
)
self
.
_addERP5Login
(
self
.
compute_node
)
self
.
tic
()
self
.
tic
()
...
...
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