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
Xiaowu Zhang
slapos.core
Commits
0efe833e
Commit
0efe833e
authored
Apr 29, 2022
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Plain Diff
Improvements for setup and login
See merge request
nexedi/slapos.core!379
parents
85441807
4aba7622
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
123 additions
and
438 deletions
+123
-438
master/bt5/slapos_configurator/PathTemplateItem/portal_workflow/slapos_master_configuration_workflow.xml
.../portal_workflow/slapos_master_configuration_workflow.xml
+1
-1
master/bt5/slapos_configurator/SkinTemplateItem/portal_skins/slapos_configurator/BusinessConfiguration_runPostUpgradeConsistency.py
...urator/BusinessConfiguration_runPostUpgradeConsistency.py
+0
-0
master/bt5/slapos_configurator/SkinTemplateItem/portal_skins/slapos_configurator/BusinessConfiguration_runPostUpgradeConsistency.xml
...rator/BusinessConfiguration_runPostUpgradeConsistency.xml
+1
-1
master/bt5/slapos_configurator/TestTemplateItem/portal_components/test.erp5.testSlapOSConfigurator.py
...tem/portal_components/test.erp5.testSlapOSConfigurator.py
+0
-5
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Web%20Message.xml
...slapos_erp5/PortalTypeRolesTemplateItem/Web%20Message.xml
+1
-1
master/bt5/slapos_erp5/PropertySheetTemplateItem/portal_property_sheets/PreferenceSlapOSConstraintPreference.xml
..._property_sheets/PreferenceSlapOSConstraintPreference.xml
+1
-1
master/bt5/slapos_erp5/PropertySheetTemplateItem/portal_property_sheets/PreferenceSlapOSConstraintPreference/conversion_server_consistency_constraint.xml
...ntPreference/conversion_server_consistency_constraint.xml
+1
-1
master/bt5/slapos_erp5/PropertySheetTemplateItem/portal_property_sheets/PreferenceSlapOSConstraintPreference/system_preference_consistency_constraint.xml
...ntPreference/system_preference_consistency_constraint.xml
+1
-1
master/bt5/slapos_erp5/PropertySheetTemplateItem/portal_property_sheets/PreferenceToolConversionServerConstraintPreference.xml
...ts/PreferenceToolConversionServerConstraintPreference.xml
+0
-66
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/CertificateLogin_isLoginBlocked.py
...rtal_skins/slapos_base/CertificateLogin_isLoginBlocked.py
+0
-4
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/CertificateLogin_isLoginBlocked.xml
...tal_skins/slapos_base/CertificateLogin_isLoginBlocked.xml
+0
-62
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/CertificateLogin_isPasswordExpired.py
...l_skins/slapos_base/CertificateLogin_isPasswordExpired.py
+0
-4
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/ERP5Site_getAvailableOAuthLoginList.py
..._skins/slapos_base/ERP5Site_getAvailableOAuthLoginList.py
+18
-0
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/ERP5Site_getAvailableOAuthLoginList.xml
...skins/slapos_base/ERP5Site_getAvailableOAuthLoginList.xml
+9
-1
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/FacebookLogin_isLoginBlocked.py
.../portal_skins/slapos_base/FacebookLogin_isLoginBlocked.py
+0
-4
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/FacebookLogin_isLoginBlocked.xml
...portal_skins/slapos_base/FacebookLogin_isLoginBlocked.xml
+0
-62
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/FacebookLogin_isPasswordExpired.py
...rtal_skins/slapos_base/FacebookLogin_isPasswordExpired.py
+0
-4
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/FacebookLogin_isPasswordExpired.xml
...tal_skins/slapos_base/FacebookLogin_isPasswordExpired.xml
+0
-62
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/GoogleLogin_isLoginBlocked.py
...em/portal_skins/slapos_base/GoogleLogin_isLoginBlocked.py
+0
-4
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/GoogleLogin_isLoginBlocked.xml
...m/portal_skins/slapos_base/GoogleLogin_isLoginBlocked.xml
+0
-62
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/GoogleLogin_isPasswordExpired.py
...portal_skins/slapos_base/GoogleLogin_isPasswordExpired.py
+0
-4
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/GoogleLogin_isPasswordExpired.xml
...ortal_skins/slapos_base/GoogleLogin_isPasswordExpired.xml
+0
-62
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_erp5/SystemPreference_checkConversionServerConsistency.py
...erp5/SystemPreference_checkConversionServerConsistency.py
+26
-0
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_erp5/SystemPreference_checkConversionServerConsistency.xml
...rp5/SystemPreference_checkConversionServerConsistency.xml
+1
-1
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_erp5/SystemPreference_checkSystemPreferenceConsistency.py
...erp5/SystemPreference_checkSystemPreferenceConsistency.py
+41
-0
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_erp5/SystemPreference_checkSystemPreferenceConsistency.xml
...rp5/SystemPreference_checkSystemPreferenceConsistency.xml
+1
-1
master/bt5/slapos_erp5/bt/template_property_sheet_id_list
master/bt5/slapos_erp5/bt/template_property_sheet_id_list
+1
-2
master/product/SlapOS/tests/testSlapOSMixin.py
master/product/SlapOS/tests/testSlapOSMixin.py
+20
-22
No files found.
master/bt5/slapos_configurator/PathTemplateItem/portal_workflow/slapos_master_configuration_workflow.xml
View file @
0efe833e
...
...
@@ -40,7 +40,7 @@
</item>
<item>
<key>
<string>
configuration_after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_
invokeSlapOSMasterPromiseAlarmList
</string>
</value>
<value>
<string>
BusinessConfiguration_
runPostUpgradeConsistency
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
...
...
master/bt5/slapos_configurator/SkinTemplateItem/portal_skins/slapos_configurator/BusinessConfiguration_
invokeSlapOSMasterPromiseAlarmList
.py
→
master/bt5/slapos_configurator/SkinTemplateItem/portal_skins/slapos_configurator/BusinessConfiguration_
runPostUpgradeConsistency
.py
View file @
0efe833e
File moved
master/bt5/slapos_
erp5/SkinTemplateItem/portal_skins/slapos_base/CertificateLogin_isPasswordExpired
.xml
→
master/bt5/slapos_
configurator/SkinTemplateItem/portal_skins/slapos_configurator/BusinessConfiguration_runPostUpgradeConsistency
.xml
View file @
0efe833e
...
...
@@ -54,7 +54,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
CertificateLogin_isPasswordExpired
</string>
</value>
<value>
<string>
BusinessConfiguration_runPostUpgradeConsistency
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_configurator/TestTemplateItem/portal_components/test.erp5.testSlapOSConfigurator.py
View file @
0efe833e
...
...
@@ -28,11 +28,6 @@ import os
class
TestSlapOSConfigurator
(
SlapOSTestCaseMixin
):
maxDiff
=
None
def
bootstrapSite
(
self
):
SlapOSTestCaseMixin
.
bootstrapSite
(
self
)
self
.
getBusinessConfiguration
().
BusinessConfiguration_invokeSlapOSMasterPromiseAlarmList
()
self
.
tic
()
def
testConfiguredModuleGeneratorIDViaConstraint
(
self
):
""" Make sure Generator ID is well configured, in this
case we trust on promise outcome."""
...
...
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Web%20Message.xml
View file @
0efe833e
...
...
@@ -8,7 +8,7 @@
<multi_property
id=
'base_category'
>
destination
</multi_property>
</role>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Customer
</property>
<property
id=
'title'
>
Customer
Source
</property>
<property
id=
'description'
>
Monovalued role
</property>
<property
id=
'condition'
>
python: here.getSourceValue(portal_type='Person') is not None
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
...
...
master/bt5/slapos_erp5/PropertySheetTemplateItem/portal_property_sheets/Preference
Tool
SlapOSConstraintPreference.xml
→
master/bt5/slapos_erp5/PropertySheetTemplateItem/portal_property_sheets/PreferenceSlapOSConstraintPreference.xml
View file @
0efe833e
...
...
@@ -32,7 +32,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Preference
Tool
SlapOSConstraintPreference
</string>
</value>
<value>
<string>
PreferenceSlapOSConstraintPreference
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
...
...
master/bt5/slapos_erp5/PropertySheetTemplateItem/portal_property_sheets/Preference
ToolConversionServer
ConstraintPreference/conversion_server_consistency_constraint.xml
→
master/bt5/slapos_erp5/PropertySheetTemplateItem/portal_property_sheets/Preference
SlapOS
ConstraintPreference/conversion_server_consistency_constraint.xml
View file @
0efe833e
...
...
@@ -42,7 +42,7 @@
</item>
<item>
<key>
<string>
script_id
</string>
</key>
<value>
<string>
PreferenceTool
_checkConversionServerConsistency
</string>
</value>
<value>
<string>
SystemPreference
_checkConversionServerConsistency
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_erp5/PropertySheetTemplateItem/portal_property_sheets/Preference
Tool
SlapOSConstraintPreference/system_preference_consistency_constraint.xml
→
master/bt5/slapos_erp5/PropertySheetTemplateItem/portal_property_sheets/PreferenceSlapOSConstraintPreference/system_preference_consistency_constraint.xml
View file @
0efe833e
...
...
@@ -42,7 +42,7 @@
</item>
<item>
<key>
<string>
script_id
</string>
</key>
<value>
<string>
PreferenceTool
_checkSystemPreferenceConsistency
</string>
</value>
<value>
<string>
SystemPreference
_checkSystemPreferenceConsistency
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_erp5/PropertySheetTemplateItem/portal_property_sheets/PreferenceToolConversionServerConstraintPreference.xml
deleted
100644 → 0
View file @
85441807
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Property Sheet"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_count
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_mt_index
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_tree
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
PreferenceToolConversionServerConstraintPreference
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Property Sheet
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Length"
module=
"BTrees.Length"
/>
</pickle>
<pickle>
<int>
0
</int>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/CertificateLogin_isLoginBlocked.py
deleted
100644 → 0
View file @
85441807
"""
Certificate Login isn't controlled by ERP5 itself
"""
return
False
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/CertificateLogin_isLoginBlocked.xml
deleted
100644 → 0
View file @
85441807
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
CertificateLogin_isLoginBlocked
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/CertificateLogin_isPasswordExpired.py
deleted
100644 → 0
View file @
85441807
"""
Certificate Login isn't controlled by ERP5 itself
"""
return
False
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/ERP5Site_getAvailableOAuthLoginList.py
0 → 100644
View file @
0efe833e
oauth_login_list
=
[]
portal_skin
=
context
.
getPortalObject
().
portal_skins
if
getattr
(
portal_skin
,
"erp5_oauth_google_login"
,
None
)
is
not
None
:
connector
=
context
.
ERP5Site_getGoogleConnector
()
if
connector
is
not
None
and
connector
[
0
].
getClientId
()
is
not
None
:
oauth_login_list
.
append
(
"google"
)
if
getattr
(
portal_skin
,
"erp5_oauth_facebook_login"
,
None
)
is
not
None
:
connector
=
context
.
ERP5Site_getFacebookConnector
()
if
connector
is
not
None
and
connector
[
0
].
getClientId
()
is
not
None
:
oauth_login_list
.
append
(
"facebook"
)
if
getattr
(
portal_skin
,
"erp5_openid_connect_client"
,
None
)
is
not
None
:
oauth_login_list
.
append
(
"openidconnect"
)
return
oauth_login_list
master/bt5/slapos_
configurator/SkinTemplateItem/portal_skins/slapos_configurator/BusinessConfiguration_invokeSlapOSMasterPromiseAlarm
List.xml
→
master/bt5/slapos_
erp5/SkinTemplateItem/portal_skins/slapos_base/ERP5Site_getAvailableOAuthLogin
List.xml
View file @
0efe833e
...
...
@@ -52,9 +52,17 @@
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
BusinessConfiguration_invokeSlapOSMasterPromiseAlarm
List
</string>
</value>
<value>
<string>
ERP5Site_getAvailableOAuthLogin
List
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/FacebookLogin_isLoginBlocked.py
deleted
100644 → 0
View file @
85441807
"""
Facebook Login isn't controlled by ERP5 itself
"""
return
False
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/FacebookLogin_isLoginBlocked.xml
deleted
100644 → 0
View file @
85441807
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
FacebookLogin_isLoginBlocked
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/FacebookLogin_isPasswordExpired.py
deleted
100644 → 0
View file @
85441807
"""
Facebook Login isn't controlled by ERP5 itself
"""
return
False
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/FacebookLogin_isPasswordExpired.xml
deleted
100644 → 0
View file @
85441807
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
FacebookLogin_isPasswordExpired
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/GoogleLogin_isLoginBlocked.py
deleted
100644 → 0
View file @
85441807
"""
Google Login isn't controlled by ERP5 itself
"""
return
False
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/GoogleLogin_isLoginBlocked.xml
deleted
100644 → 0
View file @
85441807
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
GoogleLogin_isLoginBlocked
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/GoogleLogin_isPasswordExpired.py
deleted
100644 → 0
View file @
85441807
"""
Google Login isn't controlled by ERP5 itself
"""
return
False
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/GoogleLogin_isPasswordExpired.xml
deleted
100644 → 0
View file @
85441807
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
GoogleLogin_isPasswordExpired
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_erp5/
PreferenceTool
_checkConversionServerConsistency.py
→
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_erp5/
SystemPreference
_checkConversionServerConsistency.py
View file @
0efe833e
if
context
.
getPortalType
()
not
in
[
"System Preference"
]:
error_log
=
[]
if
context
.
getPortalType
()
not
in
[
"System Preference"
]:
return
[]
if
context
.
getId
()
==
"slapos_default_system_preference"
and
context
.
getPreferenceState
()
!=
"global"
:
error_log
.
extend
(
context
.
SystemPreference_checkSystemPreferenceConsistency
(
fixit
=
fixit
,
**
kw
))
if
context
.
getPreferenceState
()
!=
"global"
:
return
[]
...
...
@@ -14,7 +19,8 @@ if expected_url != url:
if
fixit
:
system_preference
.
setPreferredDocumentConversionServerUrl
(
expected_url
)
fixing
=
' (fixed)'
return
[
"Conversion Server not configured as expected%s: %s"
%
(
fixing
,
"Expect %s
\
n
Got %s"
%
(
expected_url
,
url
))]
else
:
return
[]
error_log
.
append
(
"Conversion Server not configured as expected%s: %s"
%
(
fixing
,
"Expect %s
\
n
Got %s"
%
(
expected_url
,
url
)))
return
error_log
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_erp5/
PreferenceTool
_checkConversionServerConsistency.xml
→
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_erp5/
SystemPreference
_checkConversionServerConsistency.xml
View file @
0efe833e
...
...
@@ -54,7 +54,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
PreferenceTool
_checkConversionServerConsistency
</string>
</value>
<value>
<string>
SystemPreference
_checkConversionServerConsistency
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_erp5/
PreferenceTool
_checkSystemPreferenceConsistency.py
→
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_erp5/
SystemPreference
_checkSystemPreferenceConsistency.py
View file @
0efe833e
...
...
@@ -3,13 +3,26 @@
ensure the site configuration is set.
"""
if
context
.
getPortalType
()
not
in
[
"System Preference"
]:
if
context
.
getPortalType
()
not
in
[
"System Preference"
]:
return
[]
error_list
=
[]
if
context
.
getId
()
==
"slapos_default_system_preference"
and
context
.
getPreferenceState
()
!=
"global"
:
error_list
.
append
(
"The Default System preference globally enabled shouldn't be slapos_default_system_preference"
%
context
.
getId
())
if
fixit
:
context
.
globalEnable
(
comment
=
"Enabled by PreferenceTool_checkSystemPreferenceConsistency"
)
if
context
.
getPreferenceState
()
!=
"global"
:
return
[]
error_list
=
[]
if
context
.
getId
()
!=
"slapos_default_system_preference"
:
error_list
.
append
(
"The Default System preference globally enabled shouldn't be %s but slapos_default_system_preference"
%
context
.
getId
())
if
fixit
:
context
.
disable
(
comment
=
"Disabled by PreferenceTool_checkSystemPreferenceConsistency"
)
preference_method_list
=
[
"getPreferredHateoasUrl"
,
...
...
@@ -20,7 +33,6 @@ preference_method_list = [
]
for
method_id
in
preference_method_list
:
result
=
getattr
(
context
.
portal_preferences
,
method_id
)()
if
result
in
[
None
,
""
]:
error_list
.
append
(
...
...
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_erp5/
PreferenceTool
_checkSystemPreferenceConsistency.xml
→
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_erp5/
SystemPreference
_checkSystemPreferenceConsistency.xml
View file @
0efe833e
...
...
@@ -54,7 +54,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
PreferenceTool
_checkSystemPreferenceConsistency
</string>
</value>
<value>
<string>
SystemPreference
_checkSystemPreferenceConsistency
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_erp5/bt/template_property_sheet_id_list
View file @
0efe833e
PreferenceToolSlapOSConstraintPreference
PreferenceToolConversionServerConstraintPreference
PreferenceSlapOSConstraintPreference
CertificateAuthorityToolConsistencyConstraint
SlapOSModuleIdGeneratorConstraint
MemcachedToolServerConstraint
...
...
master/product/SlapOS/tests/testSlapOSMixin.py
View file @
0efe833e
...
...
@@ -160,17 +160,7 @@ class testSlapOSMixin(ERP5TypeTestCase):
self
.
commit
()
self
.
launchConfigurator
()
def
afterSetUp
(
self
):
self
.
login
()
self
.
createAlarmStep
()
if
self
.
isLiveTest
():
self
.
setUpPersistentDummyMailHost
()
return
self
.
portal
.
portal_caches
.
erp5_site_global_id
=
'%s'
%
random
.
random
()
self
.
portal
.
portal_caches
.
_p_changed
=
1
self
.
createCertificateAuthorityFile
()
self
.
commit
()
def
updateInitSite
(
self
):
self
.
portal
.
portal_caches
.
updateCache
()
try
:
...
...
@@ -182,13 +172,20 @@ class testSlapOSMixin(ERP5TypeTestCase):
initsite
[
"cloudooo_url"
]
=
"https://cloudooo.erp5.net"
config
.
product_config
[
"initsite"
]
=
initsite
self
.
commit
()
def
afterSetUp
(
self
):
self
.
login
()
self
.
createAlarmStep
()
if
self
.
isLiveTest
():
self
.
setUpPersistentDummyMailHost
()
return
self
.
portal
.
portal_caches
.
erp5_site_global_id
=
'%s'
%
random
.
random
()
self
.
portal
.
portal_caches
.
_p_changed
=
1
self
.
createCertificateAuthorityFile
()
if
not
getattr
(
self
.
portal
,
'is_site_bootstrapped'
,
0
):
self
.
portal
.
is_site_bootstrapped
=
1
self
.
bootstrapSite
()
self
.
portal
.
_p_changed
=
1
self
.
commit
()
self
.
commit
()
self
.
updateInitSite
()
def
deSetUpPersistentDummyMailHost
(
self
):
if
'MailHost'
in
self
.
portal
.
objectIds
():
...
...
@@ -209,8 +206,9 @@ class testSlapOSMixin(ERP5TypeTestCase):
"slapos_master_configuration_workflow"
]
def
launchConfigurator
(
self
):
self
.
logMessage
(
'SlapOS launchConfigurator'
)
self
.
logMessage
(
'SlapOS launchConfigurator
...
\
n
'
)
self
.
login
()
self
.
updateInitSite
()
# Create new Configuration
business_configuration
=
self
.
getBusinessConfiguration
()
...
...
@@ -226,13 +224,13 @@ class testSlapOSMixin(ERP5TypeTestCase):
self
.
portal
.
portal_types
.
resetDynamicDocumentsOnceAtTransactionBoundary
()
self
.
tic
(
verbose
=
True
,
delay
=
3600
)
def
bootstrapSite
(
self
):
self
.
logMessage
(
'SlapOS bootstrapSite'
)
self
.
getDefaultSystemPreference
()
.
setPreferredHateoasUrl
(
"http://dummy/"
)
self
.
getDefaultSystemPreference
()
.
setPreferredAuthenticationPolicyEnabled
(
True
)
# Set post upgrade configurations for the tests
preference_tool
=
self
.
portal
.
portal_preferences
.
portal_preferences
preference_tool
.
slapos_default_system_preference
.
setPreferredHateoasUrl
(
"http://dummy/"
)
preference_tool
.
slapos_default_system_preference
.
setPreferredAuthenticationPolicyEnabled
(
True
)
self
.
clearCache
()
self
.
tic
()
self
.
clearCache
()
def
getExpectedBusinessTemplateInstalledAfterConfiguration
(
self
):
return
[
'erp5_core'
,
...
...
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