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
Léo-Paul Géneau
slapos.core
Commits
db923b71
Commit
db923b71
authored
Feb 12, 2018
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: Include constraint to migrate/configure OAuth for facebook and google login
parent
54d39927
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
397 additions
and
2 deletions
+397
-2
master/bt5/slapos_erp5/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
...rtalTypePropertySheetTemplateItem/property_sheet_list.xml
+4
-1
master/bt5/slapos_erp5/PropertySheetTemplateItem/portal_property_sheets/OAuthToolDefaultSlapOSConnector.xml
...ortal_property_sheets/OAuthToolDefaultSlapOSConnector.xml
+66
-0
master/bt5/slapos_erp5/PropertySheetTemplateItem/portal_property_sheets/OAuthToolDefaultSlapOSConnector/FacebookConnector_existence_constraint.xml
...lapOSConnector/FacebookConnector_existence_constraint.xml
+80
-0
master/bt5/slapos_erp5/PropertySheetTemplateItem/portal_property_sheets/OAuthToolDefaultSlapOSConnector/GoogleConnector_existence_constraint.xml
...tSlapOSConnector/GoogleConnector_existence_constraint.xml
+80
-0
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_erp5/OAuthTool_checkFacebookConnectorExistenceConsistency.py
...5/OAuthTool_checkFacebookConnectorExistenceConsistency.py
+20
-0
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_erp5/OAuthTool_checkFacebookConnectorExistenceConsistency.xml
.../OAuthTool_checkFacebookConnectorExistenceConsistency.xml
+62
-0
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_erp5/OAuthTool_checkGoogleConnectorExistenceConsistency.py
...rp5/OAuthTool_checkGoogleConnectorExistenceConsistency.py
+20
-0
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_erp5/OAuthTool_checkGoogleConnectorExistenceConsistency.xml
...p5/OAuthTool_checkGoogleConnectorExistenceConsistency.xml
+62
-0
master/bt5/slapos_erp5/bt/template_portal_type_property_sheet_list
...5/slapos_erp5/bt/template_portal_type_property_sheet_list
+2
-1
master/bt5/slapos_erp5/bt/template_property_sheet_id_list
master/bt5/slapos_erp5/bt/template_property_sheet_id_list
+1
-0
No files found.
master/bt5/slapos_erp5/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
View file @
db923b71
...
...
@@ -8,10 +8,13 @@
<portal_type
id=
"Memcached Tool"
>
<item>
MemcachedToolServerConstraint
</item>
</portal_type>
<portal_type
id=
"OAuth Tool"
>
<item>
OAuthToolDefaultSlapOSConnector
</item>
</portal_type>
<portal_type
id=
"Organisation"
>
<item>
GeographicOrganisation
</item>
</portal_type>
<portal_type
id=
"Web Site Module"
>
<item>
WebSiteModuleShacacheConstraint
</item>
</portal_type>
</property_sheet_list>
</property_sheet_list>
\ No newline at end of file
master/bt5/slapos_erp5/PropertySheetTemplateItem/portal_property_sheets/OAuthToolDefaultSlapOSConnector.xml
0 → 100644
View file @
db923b71
<?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>
OAuthToolDefaultSlapOSConnector
</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/PropertySheetTemplateItem/portal_property_sheets/OAuthToolDefaultSlapOSConnector/FacebookConnector_existence_constraint.xml
0 → 100644
View file @
db923b71
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Script Constraint"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_identity_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_range_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
constraint_type/post_upgrade
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
FacebookConnector_existence_constraint
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Script Constraint
</string>
</value>
</item>
<item>
<key>
<string>
script_id
</string>
</key>
<value>
<string>
OAuthTool_checkFacebookConnectorExistenceConsistency
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<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>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_erp5/PropertySheetTemplateItem/portal_property_sheets/OAuthToolDefaultSlapOSConnector/GoogleConnector_existence_constraint.xml
0 → 100644
View file @
db923b71
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Script Constraint"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_identity_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_range_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
constraint_type/post_upgrade
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
GoogleConnector_existence_constraint
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Script Constraint
</string>
</value>
</item>
<item>
<key>
<string>
script_id
</string>
</key>
<value>
<string>
OAuthTool_checkGoogleConnectorExistenceConsistency
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<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>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_erp5/OAuthTool_checkFacebookConnectorExistenceConsistency.py
0 → 100644
View file @
db923b71
portal_oauth
=
context
.
portal_oauth
error_list
=
[]
for
connector
in
portal_oauth
.
searchFolder
(
portal_type
=
"Facebook Connector"
):
if
connector
.
gerReference
()
==
"default"
:
return
[]
if
fixit
:
system_preference
=
context
.
portal_preferences
.
getActiveSystemPreference
()
connector
=
portal_oauth
.
newContent
(
portal_type
=
"Facebook Connector"
,
reference
=
"default"
,
client_id
=
getattr
(
system_preference
,
"preferred_vifib_facebook_application_id"
,
None
),
secret_key
=
getattr
(
system_preference
,
"preferred_vifib_facebook_application_secret"
,
None
)
)
connector
.
validate
()
return
[]
return
[
"Default Facebook Connector is missing."
]
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_erp5/OAuthTool_checkFacebookConnectorExistenceConsistency.xml
0 → 100644
View file @
db923b71
<?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>
fixit=False
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
OAuthTool_checkFacebookConnectorExistenceConsistency
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_erp5/OAuthTool_checkGoogleConnectorExistenceConsistency.py
0 → 100644
View file @
db923b71
portal_oauth
=
context
.
portal_oauth
error_list
=
[]
for
connector
in
portal_oauth
.
searchFolder
(
portal_type
=
"Google Connector"
):
if
connector
.
gerReference
()
==
"default"
:
return
[]
if
fixit
:
system_preference
=
context
.
portal_preferences
.
getActiveSystemPreference
()
connector
=
portal_oauth
.
newContent
(
portal_type
=
"Google Connector"
,
reference
=
"default"
,
client_id
=
getattr
(
system_preference
,
"preferred_vifib_google_application_id"
,
None
),
secret_key
=
getattr
(
system_preference
,
"preferred_vifib_google_application_secret"
,
None
)
)
connector
.
validate
()
return
[]
return
[
"Default Google Connector is missing."
]
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_erp5/OAuthTool_checkGoogleConnectorExistenceConsistency.xml
0 → 100644
View file @
db923b71
<?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>
fixit=False
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
OAuthTool_checkGoogleConnectorExistenceConsistency
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_erp5/bt/template_portal_type_property_sheet_list
View file @
db923b71
Certificate Authority Tool | CertificateAuthorityToolConsistencyConstraint
Id Tool | SlapOSModuleIdGeneratorConstraint
Memcached Tool | MemcachedToolServerConstraint
OAuth Tool | OAuthToolDefaultSlapOSConnector
Organisation | GeographicOrganisation
Web Site Module | WebSiteModuleShacacheConstraint
Web Site Module | WebSiteModuleShacacheConstraint
\ No newline at end of file
master/bt5/slapos_erp5/bt/template_property_sheet_id_list
View file @
db923b71
...
...
@@ -6,3 +6,4 @@ MemcachedToolServerConstraint
GeographicOrganisation
WebSiteModuleShacacheConstraint
ShacacheSystemPreference
OAuthToolDefaultSlapOSConnector
\ No newline at end of file
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