From 92fa70a373bc89989619dd36f9bcf1a79bbf74c9 Mon Sep 17 00:00:00 2001 From: frikky Date: Tue, 15 Feb 2022 22:37:09 +0100 Subject: [PATCH] Fixed auto-unmapping of e.g. names and authentication during action change. Re-mapped with pointers rather than JSON parsing --- backend/app_sdk/app_base.py | 7 ++++- frontend/src/components/Oauth2Auth.jsx | 5 +++- frontend/src/components/ParsedAction.jsx | 22 +++++++++++++++ frontend/src/views/AngularWorkflow.jsx | 36 +++++++++++++++++++++++- functions/onprem/orborus/orborus.go | 2 +- 5 files changed, 68 insertions(+), 4 deletions(-) diff --git a/backend/app_sdk/app_base.py b/backend/app_sdk/app_base.py index 4ea014e6..a43e85da 100644 --- a/backend/app_sdk/app_base.py +++ b/backend/app_sdk/app_base.py @@ -1519,6 +1519,11 @@ class AppBase: newvalue = [] firstitem = actualitem[0][0] seconditem = actualitem[0][1] + if isinstance(firstitem, int): + firstitem = str(firstitem) + if isinstance(seconditem, int): + seconditem = str(seconditem) + print("[DEBUG] ACTUAL PARSED: %s" % actualitem) # Means it's a single item -> continue @@ -1858,8 +1863,8 @@ class AppBase: self.action_result["status"] = "FAILURE" data = { "success": False, - "input": template, "reason": f"Failed to parse LiquidPy: {error_msg}", + "input": template, } try: self.action_result["result"] = json.dumps(data) diff --git a/frontend/src/components/Oauth2Auth.jsx b/frontend/src/components/Oauth2Auth.jsx index 65134fbf..77fc31f5 100644 --- a/frontend/src/components/Oauth2Auth.jsx +++ b/frontend/src/components/Oauth2Auth.jsx @@ -121,7 +121,10 @@ const AuthenticationOauth2 = (props) => { var resources = ""; if (scopes !== undefined && (scopes !== null) & (scopes.length > 0)) { if (offlineAccess === true && !scopes.includes("offline_access")) { - scopes.push("offline_access") + if (authenticationType.redirect_uri.includes("microsoft")) { + console.log("Appending offline access") + scopes.push("offline_access") + } } resources = scopes.join(" "); diff --git a/frontend/src/components/ParsedAction.jsx b/frontend/src/components/ParsedAction.jsx index e5a88b7a..08acd626 100644 --- a/frontend/src/components/ParsedAction.jsx +++ b/frontend/src/components/ParsedAction.jsx @@ -1591,6 +1591,9 @@ const ParsedAction = (props) => { datafield = ( { selectedApp.versions !== undefined && selectedApp.versions.length > 1 ? ( {
Environment { {/*setNewSelectedAction !== undefined ? {
{
Environment