Commit 551632a1 authored by Vincent Pelletier's avatar Vincent Pelletier

fixup! all: Implement server-side OAuth2 protocol.

Migrate oauth2_session_refresh_interaction_workflow to new-style workflows.
This time, the migration should be complete.
parent 3cd804ea
Pipeline #24271 passed with stage
in 0 seconds
...@@ -2,40 +2,44 @@ ...@@ -2,40 +2,44 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<global name="InteractionWorkflowDefinition" module="Products.ERP5.InteractionWorkflow"/> <global name="Interaction Workflow" module="erp5.portal_type"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>_objects</string> </key> <key> <string>_count</string> </key>
<value> <value>
<tuple/> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
<key> <string>creation_guard</string> </key> <key> <string>_mt_index</string> </key>
<value> <value>
<none/> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value> </value>
</item> </item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>oauth2_session_refresh_interaction_workflow</string> </value>
</item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string>Calls refreshAccessToken on all OAuth2 Session documents related to a given user when their security groups change.\r\n <value> <string>Calls refreshAccessToken on all OAuth2 Session documents related to a given user when their security groups change.\r\n
Requires customisation (supplementing with a similar custom interaction workflow) when security groups are generated using a non-generic script.</string> </value> Requires customisation (supplementing with a similar custom interaction workflow) when security groups are generated using a non-generic script.</string> </value>
</item> </item>
<item>
<key> <string>groups</string> </key>
<value>
<tuple/>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>oauth2_session_refresh_interaction_workflow</string> </value> <value> <string>oauth2_session_refresh_interaction_workflow</string> </value>
</item> </item>
<item> <item>
<key> <string>manager_bypass</string> </key> <key> <string>portal_type</string> </key>
<value> <int>0</int> </value> <value> <string>Interaction Workflow</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
...@@ -44,4 +48,26 @@ Requires customisation (supplementing with a similar custom interaction workflow ...@@ -44,4 +48,26 @@ Requires customisation (supplementing with a similar custom interaction workflow
</dictionary> </dictionary>
</pickle> </pickle>
</record> </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> </ZopeData>
...@@ -2,86 +2,42 @@ ...@@ -2,86 +2,42 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<global name="InteractionDefinition" module="Products.ERP5.Interaction"/> <global name="Interaction Workflow Interaction" module="erp5.portal_type"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>actbox_category</string> </key> <key> <string>categories</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>activate_script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>before_commit_script_name</string> </key>
<value> <value>
<list> <tuple>
<string>onAssignmentChange</string> <string>before_commit_script/portal_workflow/oauth2_session_refresh_interaction_workflow/script_onAssignmentChange</string>
</list> </tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value> <value>
<none/> <none/>
</value> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>assignment</string> </value> <value> <string>interaction_assignment</string> </value>
</item> </item>
<item> <item>
<key> <string>method_id</string> </key> <key> <string>portal_type</string> </key>
<value> <value> <string>Interaction Workflow Interaction</string> </value>
<list>
<string>_set.*</string>
<string>open</string>
<string>update</string>
</list>
</value>
</item>
<item>
<key> <string>once_per_transaction</string> </key>
<value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>portal_type_filter</string> </key> <key> <string>portal_type_filter</string> </key>
<value> <value>
<list> <tuple>
<string>Assignment</string> <string>Assignment</string>
</list> </tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>portal_type_group_filter</string> </key> <key> <string>portal_type_group_filter</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>script_name</string> </key>
<value> <value>
<tuple/> <tuple/>
</value> </value>
...@@ -91,8 +47,18 @@ ...@@ -91,8 +47,18 @@
<value> <int>1</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>trigger_method_id</string> </key>
<value> <string></string> </value> <value>
<tuple>
<string>_set.*</string>
<string>open</string>
<string>update</string>
</tuple>
</value>
</item>
<item>
<key> <string>trigger_once_per_transaction</string> </key>
<value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>trigger_type</string> </key> <key> <string>trigger_type</string> </key>
......
...@@ -2,85 +2,40 @@ ...@@ -2,85 +2,40 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<global name="InteractionDefinition" module="Products.ERP5.Interaction"/> <global name="Interaction Workflow Interaction" module="erp5.portal_type"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>actbox_category</string> </key> <key> <string>categories</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>activate_script_name</string> </key>
<value> <value>
<tuple/> <tuple>
</value> <string>after_script/portal_workflow/oauth2_session_refresh_interaction_workflow/script_refreshOAuth2Session</string>
</item> </tuple>
<item>
<key> <string>after_script_name</string> </key>
<value>
<list>
<string>refreshOAuth2Session</string>
</list>
</value>
</item>
<item>
<key> <string>before_commit_script_name</string> </key>
<value>
<tuple/>
</value> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string>React to selected properties changing on the session itself to trigger a token refresh.</string> </value> <value> <string>React to selected properties changing on the session itself to trigger a token refresh.</string> </value>
</item> </item>
<item>
<key> <string>guard</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>session</string> </value> <value> <string>interaction_session</string> </value>
</item>
<item>
<key> <string>method_id</string> </key>
<value>
<list>
<string>_setPolicyExpirationDate</string>
<string>_setNetwork.*</string>
</list>
</value>
</item> </item>
<item> <item>
<key> <string>once_per_transaction</string> </key> <key> <string>portal_type</string> </key>
<value> <int>0</int> </value> <value> <string>Interaction Workflow Interaction</string> </value>
</item> </item>
<item> <item>
<key> <string>portal_type_filter</string> </key> <key> <string>portal_type_filter</string> </key>
<value> <value>
<list> <tuple>
<string>OAuth2 Session</string> <string>OAuth2 Session</string>
</list> </tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>portal_type_group_filter</string> </key> <key> <string>portal_type_group_filter</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>script_name</string> </key>
<value> <value>
<tuple/> <tuple/>
</value> </value>
...@@ -90,8 +45,17 @@ ...@@ -90,8 +45,17 @@
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>trigger_method_id</string> </key>
<value> <string></string> </value> <value>
<tuple>
<string>_setPolicyExpirationDate</string>
<string>_setNetwork.*</string>
</tuple>
</value>
</item>
<item>
<key> <string>trigger_once_per_transaction</string> </key>
<value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>trigger_type</string> </key> <key> <string>trigger_type</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Interaction" module="Products.ERP5.Interaction"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>interactions</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/> <global name="Workflow Script" module="erp5.portal_type"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -62,7 +62,17 @@ ...@@ -62,7 +62,17 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>onAssignmentChange</string> </value> <value> <string>script_onAssignmentChange</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow Script</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/> <global name="Workflow Script" module="erp5.portal_type"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -62,7 +62,17 @@ ...@@ -62,7 +62,17 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>refreshOAuth2Session</string> </value> <value> <string>script_refreshOAuth2Session</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow Script</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Scripts" module="Products.DCWorkflow.Scripts"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>scripts</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Variables" module="Products.DCWorkflow.Variables"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>variables</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Worklists" module="Products.DCWorkflow.Worklists"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>worklists</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment