orc serv fix

dev-linux
robo-bo 2 years ago
parent 6e4ca01e2c
commit afd8ab1876

@ -24,7 +24,7 @@ import uuid
import datetime import datetime
import os #for path operations import os #for path operations
from http import cookies from http import cookies
global gSettingsDict gSettingsDict = {}
from . import ServerSettings from . import ServerSettings
from . import __Orchestrator__ from . import __Orchestrator__
import copy import copy
@ -264,7 +264,7 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):
# Def to get hierarchy of the current user roles # Def to get hierarchy of the current user roles
# if return {} - all is available # if return {} - all is available
def UserRoleHierarchyGet(self): def UserRoleHierarchyGet(self):
global gSettingsDict #global gSettingsDict
lDomainUpperStr = self.OpenRPA["Domain"].upper() lDomainUpperStr = self.OpenRPA["Domain"].upper()
lUserUpperStr = self.OpenRPA["User"].upper() lUserUpperStr = self.OpenRPA["User"].upper()
return gSettingsDict.get("ServerDict", {}).get("AccessUsers", {}).get("RuleDomainUserDict", {}).get((lDomainUpperStr, lUserUpperStr), {}).get("RoleHierarchyAllowedDict", {}) return gSettingsDict.get("ServerDict", {}).get("AccessUsers", {}).get("RuleDomainUserDict", {}).get((lDomainUpperStr, lUserUpperStr), {}).get("RoleHierarchyAllowedDict", {})
@ -432,7 +432,7 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):
def do_GET(self): def do_GET(self):
try: try:
global gSettingsDict global gSettingsDict
self.timeout=gSettingsDict["ServerDict"]["RequestTimeoutSecFloat"] #self.timeout=gSettingsDict["ServerDict"]["RequestTimeoutSecFloat"]
self.request.settimeout(gSettingsDict["ServerDict"]["RequestTimeoutSecFloat"]) self.request.settimeout(gSettingsDict["ServerDict"]["RequestTimeoutSecFloat"])
threading.current_thread().request = self threading.current_thread().request = self
self.OpenRPA = {} self.OpenRPA = {}
@ -523,7 +523,7 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):
def do_POST(self): def do_POST(self):
try: try:
global gSettingsDict global gSettingsDict
self.timeout=gSettingsDict["ServerDict"]["RequestTimeoutSecFloat"] #self.timeout=gSettingsDict["ServerDict"]["RequestTimeoutSecFloat"]
self.request.settimeout(gSettingsDict["ServerDict"]["RequestTimeoutSecFloat"]) self.request.settimeout(gSettingsDict["ServerDict"]["RequestTimeoutSecFloat"])
threading.current_thread().request = self threading.current_thread().request = self
lL = gSettingsDict["Logger"] lL = gSettingsDict["Logger"]

Loading…
Cancel
Save