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
e2d5020e
Commit
e2d5020e
authored
Oct 28, 2022
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_panel_ui_test: passwd policy
parent
1e803f8a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
11 deletions
+25
-11
master/bt5/slapos_panel_ui_test/ExtensionTemplateItem/portal_components/extension.erp5.SlapOSPanelUiTest.py
...tem/portal_components/extension.erp5.SlapOSPanelUiTest.py
+17
-5
master/bt5/slapos_panel_ui_test/PathTemplateItem/portal_tests/slapos_panel_zuite/testCustomerInstanceScenario.xml
...tests/slapos_panel_zuite/testCustomerInstanceScenario.xml
+1
-1
master/bt5/slapos_panel_ui_test/PathTemplateItem/portal_tests/slapos_panel_zuite/testCustomerInstanceScenario.zpt
...tests/slapos_panel_zuite/testCustomerInstanceScenario.zpt
+6
-4
master/bt5/slapos_panel_ui_test/SkinTemplateItem/portal_skins/slapos_panel_ui_test/Zuite_SlapOSPanelTemplate.zpt
..._skins/slapos_panel_ui_test/Zuite_SlapOSPanelTemplate.zpt
+1
-1
No files found.
master/bt5/slapos_panel_ui_test/ExtensionTemplateItem/portal_components/extension.erp5.SlapOSPanelUiTest.py
View file @
e2d5020e
...
...
@@ -4,7 +4,10 @@ from AccessControl.SecurityManagement import setSecurityManager
from
AccessControl.SecurityManagement
import
newSecurityManager
def
ERP5Site_bootstrapSlapOSPanelTest
(
self
):
def
ERP5Site_bootstrapSlapOSPanelTest
(
self
,
scenario
):
if
scenario
not
in
[
'customer'
,
'customer_shared'
]:
raise
ValueError
(
'Unsupported bootstrap scenario: %s'
%
scenario
)
portal
=
self
.
getPortalObject
()
sm
=
getSecurityManager
()
...
...
@@ -30,10 +33,19 @@ def ERP5Site_bootstrapSlapOSPanelTest(self):
destination_project_value
=
project
,
function
=
'production/manager'
).
open
()
if
scenario
==
'customer_shared'
:
# XXX For shared instance, user must also be a customer
# How to create Instance Node without any user related document?
manager_person
.
newContent
(
portal_type
=
'Assignment'
,
title
=
'Customer for project %s'
%
project
.
getTitle
(),
destination_project_value
=
project
,
function
=
'customer'
).
open
()
manager_person
.
newContent
(
portal_type
=
'ERP5 Login'
,
reference
=
'manager
#
'
,
password
=
'
manager
#'
reference
=
'manager'
,
password
=
'
eiChaxo5Eefier9vAek7phie
#'
).
validate
()
manager_person
.
validate
()
...
...
@@ -51,8 +63,8 @@ def ERP5Site_bootstrapSlapOSPanelTest(self):
).
open
()
customer_person
.
newContent
(
portal_type
=
'ERP5 Login'
,
reference
=
'customer
#
'
,
password
=
'
customer
#'
reference
=
'customer'
,
password
=
'
eiChaxo5Eefier9vAek7phie
#'
).
validate
()
customer_person
.
validate
()
finally
:
...
...
master/bt5/slapos_panel_ui_test/PathTemplateItem/portal_tests/slapos_panel_zuite/test
SlapOSPanel
.xml
→
master/bt5/slapos_panel_ui_test/PathTemplateItem/portal_tests/slapos_panel_zuite/test
CustomerInstanceScenario
.xml
View file @
e2d5020e
...
...
@@ -42,7 +42,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test
SlapOSPanel
</string>
</value>
<value>
<string>
test
CustomerInstanceScenario
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
...
...
master/bt5/slapos_panel_ui_test/PathTemplateItem/portal_tests/slapos_panel_zuite/test
SlapOSPanel
.zpt
→
master/bt5/slapos_panel_ui_test/PathTemplateItem/portal_tests/slapos_panel_zuite/test
CustomerInstanceScenario
.zpt
View file @
e2d5020e
...
...
@@ -14,7 +14,9 @@
</thead>
<tbody>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSPanelTemplate/macros/slapos_init"
/>
<tal:block
tal:define=
"init_configuration python: {'scenario': 'customer'}"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSPanelTemplate/macros/slapos_init"
/>
</tal:block>
<tr>
<td>
open
</td>
...
...
@@ -25,7 +27,7 @@
<tal:block
tal:define=
"login_configuration python: {'user': 'manager
#', 'password': 'manager
#'}"
>
<tal:block
tal:define=
"login_configuration python: {'user': 'manager
', 'password': 'eiChaxo5Eefier9vAek7phie
#'}"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSPanelTemplate/macros/login"
/>
</tal:block>
...
...
@@ -211,7 +213,7 @@
<tal:block
metal:use-macro=
"here/Zuite_SlapOSPanelTemplate/macros/logout"
/>
<tal:block
tal:define=
"login_configuration python: {'user': 'customer
#', 'password': 'customer
#'}"
>
<tal:block
tal:define=
"login_configuration python: {'user': 'customer
', 'password': 'eiChaxo5Eefier9vAek7phie
#'}"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSPanelTemplate/macros/login"
/>
</tal:block>
...
...
@@ -309,7 +311,7 @@
<tal:block
metal:use-macro=
"here/Zuite_SlapOSPanelTemplate/macros/logout"
/>
<tal:block
tal:define=
"login_configuration python: {'user': 'manager
#', 'password': 'manager
#'}"
>
<tal:block
tal:define=
"login_configuration python: {'user': 'manager
', 'password': 'eiChaxo5Eefier9vAek7phie
#'}"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSPanelTemplate/macros/login"
/>
</tal:block>
...
...
master/bt5/slapos_panel_ui_test/SkinTemplateItem/portal_skins/slapos_panel_ui_test/Zuite_SlapOSPanelTemplate.zpt
View file @
e2d5020e
...
...
@@ -11,7 +11,7 @@
<tr>
<td>open</td>
<td tal:content="python:
'${base_url}/ERP5Site_bootstrapSlapOSPanelTest'
">.../ERP5Site_bootstrapSlapOSPanelTest</td>
<td tal:content="python:
'${base_url}/ERP5Site_bootstrapSlapOSPanelTest?scenario=%s' % init_configuration['scenario']
">.../ERP5Site_bootstrapSlapOSPanelTest</td>
<td></td>
</tr>
<tr>
...
...
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