Minor fix when test after rename

dev-linux
Ivan Maslov 4 years ago
parent fcb839d97c
commit 242a466944

@ -168,7 +168,7 @@ def v1_2_0_Monitor_ControlPanelDictGet(inRequest,inGlobalDict):
return bytes(message, "utf8")
from . import Orchestrator # For user defs
from . import __Orchestrator__ # For user defs
@ -177,7 +177,7 @@ from . import Orchestrator # For user defs
def v1_2_0_ProcessorOld2NewActivityDict(inActivityOld):
if inActivityOld["Type"] == "WindowsLogon":
lResult = {
"Def": Orchestrator.OSCredentialsVerify, # def link or def alias (look gSettings["Processor"]["AliasDefDict"])
"Def": __Orchestrator__.OSCredentialsVerify, # def link or def alias (look gSettings["Processor"]["AliasDefDict"])
"ArgList":[], # Args list
"ArgDict":{"inUserStr": inActivityOld["User"],"inPasswordStr":inActivityOld["Password"],"inDomainStr":inActivityOld["Domain"]}, # Args dictionary
"ArgGSettings": None, # Name of GSettings attribute: str (ArgDict) or index (for ArgList)
@ -185,7 +185,7 @@ def v1_2_0_ProcessorOld2NewActivityDict(inActivityOld):
}
elif inActivityOld["Type"] == "GlobalDictKeyListValueGet":
lResult = {
"Def": Orchestrator.GSettingsKeyListValueGet, # def link or def alias (look gSettings["Processor"]["AliasDefDict"])
"Def": __Orchestrator__.GSettingsKeyListValueGet, # def link or def alias (look gSettings["Processor"]["AliasDefDict"])
"ArgList":[], # Args list
"ArgDict":{"inKeyList": inActivityOld["KeyList"]}, # Args dictionary
"ArgGSettings": "inGSettings", # Name of GSettings attribute: str (ArgDict) or index (for ArgList)
@ -193,7 +193,7 @@ def v1_2_0_ProcessorOld2NewActivityDict(inActivityOld):
}
elif inActivityOld["Type"] == "CMDStart":
lResult = {
"Def": Orchestrator.OSCMD, # def link or def alias (look gSettings["Processor"]["AliasDefDict"])
"Def": __Orchestrator__.OSCMD, # def link or def alias (look gSettings["Processor"]["AliasDefDict"])
"ArgList": [], # Args list
"ArgDict": {"inCMDStr": inActivityOld["Command"]}, # Args dictionary
"ArgGSettings": None, # Name of GSettings attribute: str (ArgDict) or index (for ArgList)
@ -201,7 +201,7 @@ def v1_2_0_ProcessorOld2NewActivityDict(inActivityOld):
}
elif inActivityOld["Type"] == "OrchestratorRestart":
lResult = {
"Def": Orchestrator.OrchestratorRestart, # def link or def alias (look gSettings["Processor"]["AliasDefDict"])
"Def": __Orchestrator__.OrchestratorRestart, # def link or def alias (look gSettings["Processor"]["AliasDefDict"])
"ArgList": [], # Args list
"ArgDict": {}, # Args dictionary
"ArgGSettings": "inGSettings", # Name of GSettings attribute: str (ArgDict) or index (for ArgList)
@ -209,7 +209,7 @@ def v1_2_0_ProcessorOld2NewActivityDict(inActivityOld):
}
elif inActivityOld["Type"] == "OrchestratorSessionSave":
lResult = {
"Def": Orchestrator.OrchestratorSessionSave,
"Def": __Orchestrator__.OrchestratorSessionSave,
# def link or def alias (look gSettings["Processor"]["AliasDefDict"])
"ArgList": [], # Args list
"ArgDict": {}, # Args dictionary
@ -218,7 +218,7 @@ def v1_2_0_ProcessorOld2NewActivityDict(inActivityOld):
}
elif inActivityOld["Type"] == "GlobalDictKeyListValueSet":
lResult = {
"Def": Orchestrator.GSettingsKeyListValueSet, # def link or def alias (look gSettings["Processor"]["AliasDefDict"])
"Def": __Orchestrator__.GSettingsKeyListValueSet, # def link or def alias (look gSettings["Processor"]["AliasDefDict"])
"ArgList": [], # Args list
"ArgDict": {"inKeyList": inActivityOld["KeyList"], "inValue": inActivityOld["Value"]}, # Args dictionary
"ArgGSettings": "inGSettings", # Name of GSettings attribute: str (ArgDict) or index (for ArgList)
@ -226,7 +226,7 @@ def v1_2_0_ProcessorOld2NewActivityDict(inActivityOld):
}
elif inActivityOld["Type"] == "GlobalDictKeyListValueAppend":
lResult = {
"Def": Orchestrator.GSettingsKeyListValueAppend, # def link or def alias (look gSettings["Processor"]["AliasDefDict"])
"Def": __Orchestrator__.GSettingsKeyListValueAppend, # def link or def alias (look gSettings["Processor"]["AliasDefDict"])
"ArgList": [], # Args list
"ArgDict": {"inKeyList": inActivityOld["KeyList"], "inValue": inActivityOld["Value"]}, # Args dictionary
"ArgGSettings": "inGSettings", # Name of GSettings attribute: str (ArgDict) or index (for ArgList)
@ -234,7 +234,7 @@ def v1_2_0_ProcessorOld2NewActivityDict(inActivityOld):
}
elif inActivityOld["Type"] == "GlobalDictKeyListValueOperator+":
lResult = {
"Def": Orchestrator.GSettingsKeyListValueOperatorPlus, # def link or def alias (look gSettings["Processor"]["AliasDefDict"])
"Def": __Orchestrator__.GSettingsKeyListValueOperatorPlus, # def link or def alias (look gSettings["Processor"]["AliasDefDict"])
"ArgList": [], # Args list
"ArgDict": {"inKeyList": inActivityOld["KeyList"], "inValue": inActivityOld["Value"]}, # Args dictionary
"ArgGSettings": None, # Name of GSettings attribute: str (ArgDict) or index (for ArgList)
@ -242,7 +242,7 @@ def v1_2_0_ProcessorOld2NewActivityDict(inActivityOld):
}
elif inActivityOld["Type"] == "ProcessStart":
lResult = {
"Def": Orchestrator.ProcessStart, # def link or def alias (look gSettings["Processor"]["AliasDefDict"])
"Def": __Orchestrator__.ProcessStart, # def link or def alias (look gSettings["Processor"]["AliasDefDict"])
"ArgList": [], # Args list
"ArgDict": {"inPathStr": inActivityOld["Path"], "inArgList": inActivityOld["ArgList"]}, # Args dictionary
"ArgGSettings": None, # Name of GSettings attribute: str (ArgDict) or index (for ArgList)
@ -250,7 +250,7 @@ def v1_2_0_ProcessorOld2NewActivityDict(inActivityOld):
}
elif inActivityOld["Type"] == "ProcessStartIfTurnedOff":
lResult = {
"Def": Orchestrator.ProcessStart, # def link or def alias (look gSettings["Processor"]["AliasDefDict"])
"Def": __Orchestrator__.ProcessStart, # def link or def alias (look gSettings["Processor"]["AliasDefDict"])
"ArgList": [], # Args list
"ArgDict": {"inPathStr": inActivityOld["Path"], "inArgList": inActivityOld["ArgList"], "inStopProcessNameWOExeStr": inActivityOld["CheckTaskName"]}, # Args dictionary
"ArgGSettings": None, # Name of GSettings attribute: str (ArgDict) or index (for ArgList)
@ -258,7 +258,7 @@ def v1_2_0_ProcessorOld2NewActivityDict(inActivityOld):
}
elif inActivityOld["Type"] == "ProcessStop":
lResult = {
"Def": Orchestrator.ProcessStop, # def link or def alias (look gSettings["Processor"]["AliasDefDict"])
"Def": __Orchestrator__.ProcessStop, # def link or def alias (look gSettings["Processor"]["AliasDefDict"])
"ArgList": [], # Args list
"ArgDict": {"inProcessNameWOExeStr": inActivityOld["Name"], "inCloseForceBool": inActivityOld["FlagForce"], "inUserNameStr": inActivityOld["User"]}, # Args dictionary
"ArgGSettings": None, # Name of GSettings attribute: str (ArgDict) or index (for ArgList)
@ -266,7 +266,7 @@ def v1_2_0_ProcessorOld2NewActivityDict(inActivityOld):
}
elif inActivityOld["Type"] == "PythonStart":
lResult = {
"Def": Orchestrator.PythonStart, # def link or def alias (look gSettings["Processor"]["AliasDefDict"])
"Def": __Orchestrator__.PythonStart, # def link or def alias (look gSettings["Processor"]["AliasDefDict"])
"ArgList": [], # Args list
"ArgDict": {"inModulePathStr": inActivityOld["ModuleName"], "inDefNameStr": inActivityOld["FunctionName"], "inArgList": inActivityOld["ArgList"],
"inArgDict": inActivityOld["ArgDict"] }, # Args dictionary
@ -316,7 +316,7 @@ def Update(inGSettings):
}
}
if lL: lL.warning(f"Backward compatibility (v1.1.13 to v1.1.14): Add default 'Client' structure") # Log about compatibility
if "RequestTimeoutSecFloat" not in inGSettings["Server"]: # Add Server > "RequestTimeoutSecFloat" property
if "Server" in inGSettings and "RequestTimeoutSecFloat" not in inGSettings["Server"]: # Add Server > "RequestTimeoutSecFloat" property
inGSettings["Server"]["RequestTimeoutSecFloat"] = 300 # Time to handle request in seconds
if lL: lL.warning(
f"Backward compatibility (v1.1.13 to v1.1.14): Add default 'Server' > 'RequestTimeoutSecFloat' property") # Log about compatibility
@ -366,8 +366,9 @@ def Update(inGSettings):
# lUserRights = inGSettings["Server"]["AccessUsers"]["RuleDomainUserDict"][(inRequest.OpenRPA["Domain"].upper(), inRequest.OpenRPA["User"].upper())]
# if len(lUserRights["ControlPanelKeyAllowedList"]) > 0 and lItem["KeyStr"] not in lUserRights["ControlPanelKeyAllowedList"]:
# lUACBool = False # UAC Check is not passed - False for user
lShowWarnBool = False
# # Convert to UACClient dict
if "Server" in inGSettings:
lShowWarnBool = False
lRuleDomainUserDeepCopyDict = copy.deepcopy(inGSettings["Server"]["AccessUsers"]["RuleDomainUserDict"])
for lItemKeyTurple in lRuleDomainUserDeepCopyDict:
lDomainUpperStr = lItemKeyTurple[0]
@ -379,7 +380,7 @@ def Update(inGSettings):
for lAllowedKeyItemStr in lItemDict["ControlPanelKeyAllowedList"]:
lUACClientDict["pyOpenRPADict"]["CPKeyDict"][lAllowedKeyItemStr]=True # Convert
# Send update UACDict for user by the list
Orchestrator.OrchestratorUACUpdate(inGSettings=inGSettings,inADLoginStr=lUserUpperStr, inADStr=lDomainUpperStr, inRoleHierarchyAllowedDict=lUACClientDict)
__Orchestrator__.OrchestratorUACUpdate(inGSettings=inGSettings,inADLoginStr=lUserUpperStr, inADStr=lDomainUpperStr, inRoleHierarchyAllowedDict=lUACClientDict)
# remove "ControlPanelKeyAllowedList"
del inGSettings["Server"]["AccessUsers"]["RuleDomainUserDict"][lItemKeyTurple]["ControlPanelKeyAllowedList"]
if lShowWarnBool: # Show only 1 warning per all run

@ -4,6 +4,6 @@ The pyOpenRPA package (from UnicodeLabs)
"""
from .Web import Basic
from .Orchestrator import *
from .__Orchestrator__ import *
__all__ = []
__author__ = 'Ivan Maslov <ivan.maslov@unicodelabs.ru>'
Loading…
Cancel
Save