|
|
@ -842,7 +842,7 @@ def UACSuperTokenUpdate(inSuperTokenStr, inGSettings=None):
|
|
|
|
# # # # # # # # # # # # # # # # # # # # # # #
|
|
|
|
# # # # # # # # # # # # # # # # # # # # # # #
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def WebURLConnectDef(inMethodStr, inURLStr, inMatchTypeStr, inDef, inContentTypeStr="application/octet-stream", inGSettings = None):
|
|
|
|
def WebURLConnectDef(inMethodStr, inURLStr, inMatchTypeStr, inDef, inContentTypeStr="application/octet-stream", inGSettings = None, inUACBool = None):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
Connect URL to DEF
|
|
|
|
Connect URL to DEF
|
|
|
|
"inMethodStr":"GET|POST",
|
|
|
|
"inMethodStr":"GET|POST",
|
|
|
@ -857,6 +857,7 @@ def WebURLConnectDef(inMethodStr, inURLStr, inMatchTypeStr, inDef, inContentType
|
|
|
|
:param inMatchTypeStr: #"BeginWith|Contains|Equal|EqualCase",
|
|
|
|
:param inMatchTypeStr: #"BeginWith|Contains|Equal|EqualCase",
|
|
|
|
:param inDef: def arg allowed list: 2:[inRequest, inGSettings], 1: [inRequest], 0: []
|
|
|
|
:param inDef: def arg allowed list: 2:[inRequest, inGSettings], 1: [inRequest], 0: []
|
|
|
|
:param inContentTypeStr: default: "application/octet-stream"
|
|
|
|
:param inContentTypeStr: default: "application/octet-stream"
|
|
|
|
|
|
|
|
:param inUACBool: default: None; True - check user access before do this URL item. None - get Server flag if ask user
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
inGSettings = GSettingsGet(inGSettings=inGSettings) # Set the global settings
|
|
|
|
inGSettings = GSettingsGet(inGSettings=inGSettings) # Set the global settings
|
|
|
|
lURLItemDict = {
|
|
|
|
lURLItemDict = {
|
|
|
@ -867,24 +868,27 @@ def WebURLConnectDef(inMethodStr, inURLStr, inMatchTypeStr, inDef, inContentType
|
|
|
|
#"ResponseFolderPath": "C:\Abs\Archive\scopeSrcUL\OpenRPA\Orchestrator\Settings",
|
|
|
|
#"ResponseFolderPath": "C:\Abs\Archive\scopeSrcUL\OpenRPA\Orchestrator\Settings",
|
|
|
|
# Absolute or relative path
|
|
|
|
# Absolute or relative path
|
|
|
|
"ResponseContentType": inContentTypeStr, #HTTP Content-type
|
|
|
|
"ResponseContentType": inContentTypeStr, #HTTP Content-type
|
|
|
|
"ResponseDefRequestGlobal": inDef #Function with str result
|
|
|
|
"ResponseDefRequestGlobal": inDef, #Function with str result
|
|
|
|
|
|
|
|
"UACBool": inUACBool
|
|
|
|
}
|
|
|
|
}
|
|
|
|
inGSettings["ServerDict"]["URLList"].append(lURLItemDict)
|
|
|
|
inGSettings["ServerDict"]["URLList"].append(lURLItemDict)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def WebURLConnectFolder(inMethodStr, inURLStr, inMatchTypeStr, inFolderPathStr, inGSettings = None):
|
|
|
|
def WebURLConnectFolder(inMethodStr, inURLStr, inMatchTypeStr, inFolderPathStr, inGSettings = None, inUACBool = None):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
Connect URL to Folder
|
|
|
|
Connect URL to Folder
|
|
|
|
"inMethodStr":"GET|POST",
|
|
|
|
"inMethodStr":"GET|POST",
|
|
|
|
"inURLStr": "/Folder/", #URL of the request
|
|
|
|
"inURLStr": "/Folder/", #URL of the request
|
|
|
|
"inMatchTypeStr": "", #"BeginWith|Contains|Equal|EqualCase",
|
|
|
|
"inMatchTypeStr": "", #"BeginWith|Contains|Equal|EqualCase",
|
|
|
|
"inFolderPathStr": "", #Absolute or relative path
|
|
|
|
"inFolderPathStr": "", #Absolute or relative path
|
|
|
|
|
|
|
|
"inUACBool"
|
|
|
|
|
|
|
|
|
|
|
|
:param inGSettings: Global settings dict (singleton)
|
|
|
|
:param inGSettings: Global settings dict (singleton)
|
|
|
|
:param inMethodStr:
|
|
|
|
:param inMethodStr:
|
|
|
|
:param inURLStr:
|
|
|
|
:param inURLStr:
|
|
|
|
:param inMatchTypeStr:
|
|
|
|
:param inMatchTypeStr:
|
|
|
|
:param inFolderPathStr:
|
|
|
|
:param inFolderPathStr:
|
|
|
|
|
|
|
|
:param inUACBool: default: None; True - check user access before do this URL item. None - get Server flag if ask user
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
inGSettings = GSettingsGet(inGSettings=inGSettings) # Set the global settings
|
|
|
|
inGSettings = GSettingsGet(inGSettings=inGSettings) # Set the global settings
|
|
|
|
# Check if last symbol is "/" - append if not exist
|
|
|
|
# Check if last symbol is "/" - append if not exist
|
|
|
@ -899,11 +903,12 @@ def WebURLConnectFolder(inMethodStr, inURLStr, inMatchTypeStr, inFolderPathStr,
|
|
|
|
"ResponseFolderPath": lFolderPathStr, # Absolute or relative path
|
|
|
|
"ResponseFolderPath": lFolderPathStr, # Absolute or relative path
|
|
|
|
"ResponseContentType": "application/octet-stream", #HTTP Content-type
|
|
|
|
"ResponseContentType": "application/octet-stream", #HTTP Content-type
|
|
|
|
#"ResponseDefRequestGlobal": inDef #Function with str result
|
|
|
|
#"ResponseDefRequestGlobal": inDef #Function with str result
|
|
|
|
|
|
|
|
"UACBool": inUACBool
|
|
|
|
}
|
|
|
|
}
|
|
|
|
inGSettings["ServerDict"]["URLList"].append(lURLItemDict)
|
|
|
|
inGSettings["ServerDict"]["URLList"].append(lURLItemDict)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def WebURLConnectFile(inMethodStr, inURLStr, inMatchTypeStr, inFilePathStr, inContentTypeStr="application/octet-stream", inGSettings = None):
|
|
|
|
def WebURLConnectFile(inMethodStr, inURLStr, inMatchTypeStr, inFilePathStr, inContentTypeStr="application/octet-stream", inGSettings = None, inUACBool = None):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
Connect URL to File
|
|
|
|
Connect URL to File
|
|
|
|
"inMethodStr":"GET|POST",
|
|
|
|
"inMethodStr":"GET|POST",
|
|
|
@ -917,6 +922,7 @@ def WebURLConnectFile(inMethodStr, inURLStr, inMatchTypeStr, inFilePathStr, inCo
|
|
|
|
:param inMatchTypeStr:
|
|
|
|
:param inMatchTypeStr:
|
|
|
|
:param inFilePathStr:
|
|
|
|
:param inFilePathStr:
|
|
|
|
:param inContentTypeStr:
|
|
|
|
:param inContentTypeStr:
|
|
|
|
|
|
|
|
:param inUACBool: default: None; True - check user access before do this URL item. None - get Server flag if ask user
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
inGSettings = GSettingsGet(inGSettings=inGSettings) # Set the global settings
|
|
|
|
inGSettings = GSettingsGet(inGSettings=inGSettings) # Set the global settings
|
|
|
|
lURLItemDict = {
|
|
|
|
lURLItemDict = {
|
|
|
@ -927,6 +933,7 @@ def WebURLConnectFile(inMethodStr, inURLStr, inMatchTypeStr, inFilePathStr, inCo
|
|
|
|
#"ResponseFolderPath": os.path.abspath(inFilePathStr), # Absolute or relative path
|
|
|
|
#"ResponseFolderPath": os.path.abspath(inFilePathStr), # Absolute or relative path
|
|
|
|
"ResponseContentType": inContentTypeStr, #HTTP Content-type
|
|
|
|
"ResponseContentType": inContentTypeStr, #HTTP Content-type
|
|
|
|
#"ResponseDefRequestGlobal": inDef #Function with str result
|
|
|
|
#"ResponseDefRequestGlobal": inDef #Function with str result
|
|
|
|
|
|
|
|
"UACBool":inUACBool
|
|
|
|
}
|
|
|
|
}
|
|
|
|
inGSettings["ServerDict"]["URLList"].append(lURLItemDict)
|
|
|
|
inGSettings["ServerDict"]["URLList"].append(lURLItemDict)
|
|
|
|
|
|
|
|
|
|
|
|