From 2460a9162de11b2ae30d015b3b28f3606d3e3b02 Mon Sep 17 00:00:00 2001 From: Ivan Maslov Date: Wed, 10 Jun 2020 19:22:45 +0300 Subject: [PATCH] # Update Python x32 and x64 to v.1.1.8 - need test --- .../INSTALLER | 0 .../pyOpenRPA-1.1.8.dist-info}/METADATA | 2 +- .../pyOpenRPA-1.1.8.dist-info}/RECORD | 22 +-- .../WHEEL | 0 .../top_level.txt | 0 .../pyOpenRPA/Orchestrator/Server.py | 56 ++++++- .../pyOpenRPA/Orchestrator/ServerSettings.py | 13 +- .../pyOpenRPA/Orchestrator/Web/Index.xhtml | 151 ++++-------------- .../pyOpenRPA/Robot/UIDesktop.py | 20 ++- .../Lib/site-packages/pyOpenRPA/__init__.py | 2 +- .../INSTALLER | 0 .../pyOpenRPA-1.1.8.dist-info}/METADATA | 2 +- .../pyOpenRPA-1.1.8.dist-info}/RECORD | 22 +-- .../WHEEL | 0 .../top_level.txt | 0 .../pyOpenRPA/Orchestrator/Server.py | 56 ++++++- .../pyOpenRPA/Orchestrator/ServerSettings.py | 13 +- .../pyOpenRPA/Orchestrator/Web/Index.xhtml | 151 ++++-------------- .../pyOpenRPA/Robot/UIDesktop.py | 20 ++- .../Lib/site-packages/pyOpenRPA/__init__.py | 2 +- Sources/pyOpenRPA/__init__.py | 2 +- v1.1.7 => v1.1.8 | 0 22 files changed, 261 insertions(+), 273 deletions(-) rename Resources/WPy32-3720/python-3.7.2/Lib/site-packages/{pyOpenRPA-1.1.7.dist-info => pyOpenRPA-1.1.8.dist-info}/INSTALLER (100%) rename Resources/{WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.1.7.dist-info => WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.1.8.dist-info}/METADATA (99%) rename Resources/{WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.1.7.dist-info => WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.1.8.dist-info}/RECORD (97%) rename Resources/WPy32-3720/python-3.7.2/Lib/site-packages/{pyOpenRPA-1.1.7.dist-info => pyOpenRPA-1.1.8.dist-info}/WHEEL (100%) rename Resources/WPy32-3720/python-3.7.2/Lib/site-packages/{pyOpenRPA-1.1.7.dist-info => pyOpenRPA-1.1.8.dist-info}/top_level.txt (100%) rename Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/{pyOpenRPA-1.1.7.dist-info => pyOpenRPA-1.1.8.dist-info}/INSTALLER (100%) rename Resources/{WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.1.7.dist-info => WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.1.8.dist-info}/METADATA (99%) rename Resources/{WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.1.7.dist-info => WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.1.8.dist-info}/RECORD (97%) rename Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/{pyOpenRPA-1.1.7.dist-info => pyOpenRPA-1.1.8.dist-info}/WHEEL (100%) rename Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/{pyOpenRPA-1.1.7.dist-info => pyOpenRPA-1.1.8.dist-info}/top_level.txt (100%) rename v1.1.7 => v1.1.8 (100%) diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.1.7.dist-info/INSTALLER b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.1.8.dist-info/INSTALLER similarity index 100% rename from Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.1.7.dist-info/INSTALLER rename to Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.1.8.dist-info/INSTALLER diff --git a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.1.7.dist-info/METADATA b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.1.8.dist-info/METADATA similarity index 99% rename from Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.1.7.dist-info/METADATA rename to Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.1.8.dist-info/METADATA index e165311a..913f21f3 100644 --- a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.1.7.dist-info/METADATA +++ b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.1.8.dist-info/METADATA @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pyOpenRPA -Version: 1.1.7 +Version: 1.1.8 Summary: First open source RPA platform for business Home-page: https://gitlab.com/UnicodeLabs/OpenRPA Author: Ivan Maslov diff --git a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.1.7.dist-info/RECORD b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.1.8.dist-info/RECORD similarity index 97% rename from Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.1.7.dist-info/RECORD rename to Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.1.8.dist-info/RECORD index faa045d0..63ff6e3a 100644 --- a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.1.7.dist-info/RECORD +++ b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.1.8.dist-info/RECORD @@ -1,14 +1,14 @@ -pyOpenRPA-1.1.7.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 -pyOpenRPA-1.1.7.dist-info/METADATA,sha256=1-INEcLwD0cOjRbapwir23aemV9ibQZ4wV4TiXRPjic,3541 -pyOpenRPA-1.1.7.dist-info/RECORD,, -pyOpenRPA-1.1.7.dist-info/WHEEL,sha256=qB97nP5e4MrOsXW5bIU5cUn_KSVr10EV0l-GCHG9qNs,97 -pyOpenRPA-1.1.7.dist-info/top_level.txt,sha256=RPzwQXgYBRo_m5L3ZLs6Voh8aEkMeT29Xsul1w1qE0g,10 +pyOpenRPA-1.1.8.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +pyOpenRPA-1.1.8.dist-info/METADATA,sha256=1_HsS23rWQTlrtEYmKKcXIypmIc9mBeIonMYsr-5Mg0,3541 +pyOpenRPA-1.1.8.dist-info/RECORD,, +pyOpenRPA-1.1.8.dist-info/WHEEL,sha256=qB97nP5e4MrOsXW5bIU5cUn_KSVr10EV0l-GCHG9qNs,97 +pyOpenRPA-1.1.8.dist-info/top_level.txt,sha256=RPzwQXgYBRo_m5L3ZLs6Voh8aEkMeT29Xsul1w1qE0g,10 pyOpenRPA/.idea/inspectionProfiles/profiles_settings.xml,sha256=YXLFmX7rPNGcnKK1uX1uKYPN0fpgskYNe7t0BV7cqkY,174 pyOpenRPA/.idea/misc.xml,sha256=ySjeaQ1DfqxaRTlFGT_3zW5r9mWuwxoAK_AX4QiuAZM,203 pyOpenRPA/.idea/modules.xml,sha256=Q__U1JIA2cjxbLRXAv-SfYY00fZA0TNlpkkbY4s3ncg,277 pyOpenRPA/.idea/pyOpenRPA.iml,sha256=EXh41F8lqRiSBMVg-n2tKaEaHC6_3gGSuKkPJA12Na0,408 pyOpenRPA/.idea/vcs.xml,sha256=2HygA1oRAwc3VBf-irxHrX5JJG9DXuQwrN0BlubhoKY,191 -pyOpenRPA/.idea/workspace.xml,sha256=b6vLBJkXjoocb4ZXHCdzrfzL2o6PuG7x_3qJ14Va9-U,2754 +pyOpenRPA/.idea/workspace.xml,sha256=kcCP7x0iSOAWJdy7YtntGrgsQ04QIq0b6_9w04DKxfg,2555 pyOpenRPA/Info.md,sha256=u4Nv-PjniSF0Zlbtr6jEJX2vblK3_1zhSLNUgOdtDaA,85 pyOpenRPA/Orchestrator/Orchestrator.py,sha256=iVp7DlLZHsURBOBegfDG4LanqSrI0A5a6GebP1cBOnI,8301 pyOpenRPA/Orchestrator/Processor.py,sha256=ur0jDDteyBzfXR4DXnpUfBwNEW-M2nEtgyd-HQoPVtQ,11376 @@ -33,10 +33,10 @@ pyOpenRPA/Orchestrator/RobotRDPActive/__pycache__/Scheduler.cpython-37.pyc,, pyOpenRPA/Orchestrator/RobotRDPActive/__pycache__/Timer.cpython-37.pyc,, pyOpenRPA/Orchestrator/RobotRDPActive/__pycache__/__init__.cpython-37.pyc,, pyOpenRPA/Orchestrator/RobotRDPActive/__pycache__/__main__.cpython-37.pyc,, -pyOpenRPA/Orchestrator/Server.py,sha256=gqJO6FRDKTBZytJVdJgPF1PvOf05qYUyKDBJJkEpLzk,22755 -pyOpenRPA/Orchestrator/ServerSettings.py,sha256=mpPAxAe6PvmKaZlreaoQAy_5wV80edz_0qc-iFrEmBQ,7123 +pyOpenRPA/Orchestrator/Server.py,sha256=I8xt39oyC5A05rrS3-1yBAXYJfrG_iT1ZIbVUmrD_0g,25483 +pyOpenRPA/Orchestrator/ServerSettings.py,sha256=v63ELppzsBx7U-90fLg8CrG2EAqjNXnObPi5E3ZPo34,7757 pyOpenRPA/Orchestrator/Timer.py,sha256=HvYtEeH2Q5WVVjgds9XaBpWRmvZgwgBXurJDdVVq_T0,2097 -pyOpenRPA/Orchestrator/Web/Index.xhtml,sha256=yPIAa6jr3VVzWXiL59LEVaaGPrKglkVzxtACpb-HOwA,38637 +pyOpenRPA/Orchestrator/Web/Index.xhtml,sha256=EFW6jPs0trHyQeKtJ8hKEEeZN9JBBkIJpjfpSI6b0Qs,36442 pyOpenRPA/Orchestrator/Web/favicon.ico,sha256=0vdsnwKGh6pgB0FDB5mOKO7RwbxQ9F13Zg16F1pkvXs,5430 pyOpenRPA/Orchestrator/__init__.py,sha256=qVH8fEPgXk54rmy-ol0PnT8GF5OlGE0a8mExwJ4tFqY,124 pyOpenRPA/Orchestrator/__main__.py,sha256=cOd8WU77VGgzTZUB0WmWpPmdYyMZY1zVyuU9yx26MKs,144 @@ -225,7 +225,7 @@ pyOpenRPA/Robot/OrchestratorConnector.py,sha256=JUtdiUXCruqUqBD19gJBl9jk_b-tpWWx pyOpenRPA/Robot/README.md,sha256=e2hKh7Tx6DAsX6jY_hBDhguL1L2Wiv6iugDB5otMzIA,2293 pyOpenRPA/Robot/SettingsTemplate.py,sha256=Rp5XPeV2I4tCS2uf4Zkqm_ERJ6pZMg4-e5_lMqGJYLk,1453 pyOpenRPA/Robot/Test.py,sha256=qXr990nXiFZX5SNv6QN9GLb_U4HZRmJnbZR2qSnwilY,2878 -pyOpenRPA/Robot/UIDesktop.py,sha256=3I2bllTDvR9d10O2ltkjoKmYw34wkkDAZfPlRpwbj30,77476 +pyOpenRPA/Robot/UIDesktop.py,sha256=V7Hb53MJHPhOF8tZhG1zwM9zOEWA4nMe2Bq0NHjmhbU,78284 pyOpenRPA/Robot/Utils/JSONNormalize.py,sha256=aIuVzuZDazhxkCOzoOjfhHVz66mp2FWdfPv5E7KWF5Y,3890 pyOpenRPA/Robot/Utils/ProcessBitness.py,sha256=WlKL-DklGaoTnchtapOTM_ydxSB4yOeo9lcG3zr2VME,4524 pyOpenRPA/Robot/Utils/ProcessCommunicator.py,sha256=8GfmLnOvAdosmt7YNT86uEV9cjhKippssCX62wOMJwM,8039 @@ -300,6 +300,6 @@ pyOpenRPA/Tools/Terminator.py,sha256=VcjX3gFXiCGu3MMCidhrTNsmC9wsAqfjRJdTSU9fLnU pyOpenRPA/Tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 pyOpenRPA/Tools/__pycache__/Terminator.cpython-37.pyc,, pyOpenRPA/Tools/__pycache__/__init__.cpython-37.pyc,, -pyOpenRPA/__init__.py,sha256=m5yh4PYhwUL7CDaoIiQC7iIbXn8LQ2tjTyPUFQx6Ulo,174 +pyOpenRPA/__init__.py,sha256=SsoRpEVSVmt8ZyoFr9X7q2UjunxaTzfc1Qmr0IP9PNs,174 pyOpenRPA/__pycache__/__init__.cpython-37.pyc,, pyOpenRPA/test.txt,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.1.7.dist-info/WHEEL b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.1.8.dist-info/WHEEL similarity index 100% rename from Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.1.7.dist-info/WHEEL rename to Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.1.8.dist-info/WHEEL diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.1.7.dist-info/top_level.txt b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.1.8.dist-info/top_level.txt similarity index 100% rename from Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.1.7.dist-info/top_level.txt rename to Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.1.8.dist-info/top_level.txt diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Orchestrator/Server.py b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Orchestrator/Server.py index be70002d..08d6b2cc 100644 --- a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Orchestrator/Server.py +++ b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Orchestrator/Server.py @@ -22,6 +22,8 @@ from http import cookies global gSettingsDict from . import ServerSettings import copy + + #Authenticate function () # return dict # { @@ -33,10 +35,6 @@ def AuthenticateVerify(inRequest): ###################################### #Way 1 - try to find AuthToken lCookies = cookies.SimpleCookie(inRequest.headers.get("Cookie", "")) - inRequest.OpenRPA = {} - inRequest.OpenRPA["AuthToken"] = None - inRequest.OpenRPA["Domain"] = None - inRequest.OpenRPA["User"] = None #pdb.set_trace() if "AuthToken" in lCookies: lCookieAuthToken = lCookies.get("AuthToken", "").value @@ -193,6 +191,34 @@ def UserAccessCheckBefore(inMethod, inRequest): return lResult # HTTPRequestHandler class class testHTTPServer_RequestHandler(BaseHTTPRequestHandler): + # Def to check User Role access grants + def UserRoleAccessAsk(self, inRoleKeyList): + lResult = True # Init flag + lRoleHierarchyDict = self.UserRoleHierarchyGet() # get the Hierarchy + # Try to get value from key list + lKeyValue = lRoleHierarchyDict # Init the base + for lItem in inRoleKeyList: + if type(lKeyValue) is dict: + if lItem in lKeyValue: # Has key + lKeyValue = lKeyValue[lItem] # Get the value and go to the next loop iteration + else: # Else branch - true or false + if len(lKeyValue)>0: # False - if Dict has some elements + lResult = False # Set the False Flag + else: + lResult = True # Set the True flag + break # Stop the loop + else: # Has element with no detalization - return True + lResult = True # Set the flag + break # Close the loop + return lResult # Return the result + + # Def to get hierarchy of the current user roles + # if return {} - all is available + def UserRoleHierarchyGet(self): + lDomainUpperStr = self.OpenRPA["Domain"].upper() + lUserUpperStr = self.OpenRPA["User"].upper() + return gSettingsDict.get("Server", {}).get("AccessUsers", {}).get("RuleDomainUserDict", {}).get((lDomainUpperStr, lUserUpperStr), {}).get("RoleHierarchyAllowedDict", {}) + #Tech def #return {"headers":[],"body":"","statuscode":111} def URLItemCheckDo(self, inURLItem, inMethod): @@ -287,6 +313,12 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler): # Write content as utf-8 data self.wfile.write(inResponseDict["Body"]) def do_GET(self): + self.OpenRPA = {} + self.OpenRPA["AuthToken"] = None + self.OpenRPA["Domain"] = None + self.OpenRPA["User"] = None + self.OpenRPA["DefUserRoleAccessAsk"]=self.UserRoleAccessAsk # Alias for def + self.OpenRPA["DefUserRoleHierarchyGet"]=self.UserRoleHierarchyGet # Alias for def # Prepare result dict lResponseDict = {"Headers": {}, "SetCookies": {}, "Body": b"", "StatusCode": None} self.OpenRPAResponseDict = lResponseDict @@ -350,6 +382,13 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler): self.end_headers() # POST def do_POST(self): + lL = gSettingsDict["Logger"] + self.OpenRPA = {} + self.OpenRPA["AuthToken"] = None + self.OpenRPA["Domain"] = None + self.OpenRPA["User"] = None + self.OpenRPA["DefUserRoleAccessAsk"]=self.UserRoleAccessAsk # Alias for def + self.OpenRPA["DefUserRoleHierarchyGet"]=self.UserRoleHierarchyGet # Alias for def # Prepare result dict #pdb.set_trace() lResponseDict = {"Headers": {}, "SetCookies":{}, "Body": b"", "StatusCode": None} @@ -360,8 +399,14 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler): ##################################### lFlagAccessUserBlock=False lAuthenticateDict = {"Domain": "", "User": ""} + lIsSuperToken = False # Is supertoken if gSettingsDict.get("Server", {}).get("AccessUsers", {}).get("FlagCredentialsAsk", False): lAuthenticateDict = AuthenticateVerify(self) + # Get Flag is supertoken (True|False) + lDomainUpperStr = self.OpenRPA["Domain"].upper() + lUserUpperStr = self.OpenRPA["User"].upper() + lIsSuperToken = gSettingsDict.get("Server", {}).get("AccessUsers", {}).get("AuthTokensDict", {}).get( + (lDomainUpperStr, lUserUpperStr), {}).get("FlagDoNotExpire", False) if not lAuthenticateDict["User"]: lFlagAccessUserBlock=True if lFlagAccessUserBlock: @@ -401,6 +446,9 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler): # Send headers self.send_header('Content-type','application/json') self.end_headers() + # Logging info about processor activity if not SuperToken () + if not lIsSuperToken: + if lL: lL.info(f"Server:: User activity from web. Domain: {self.OpenRPA['Domain']}, Username: {self.OpenRPA['User']}, Activity: {lInputObject}") # Send message back to client message = json.dumps(Processor.ActivityListOrDict(lInputObject)) # Write content as utf-8 data diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Orchestrator/ServerSettings.py b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Orchestrator/ServerSettings.py index e30e1c30..464f7eaa 100644 --- a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Orchestrator/ServerSettings.py +++ b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Orchestrator/ServerSettings.py @@ -47,6 +47,16 @@ def Monitor_ControlPanelDictGet(inRequest,inGlobalDict): # Write content as utf-8 data inResponseDict["Body"] = bytes(message, "utf8") +# UserAccess get rights hierarchy dict in json +def UserRoleHierarchyGet(inRequest,inGlobalDict): + inResponseDict = inRequest.OpenRPAResponseDict + # Create result JSON + lResultDict = inRequest.OpenRPA["DefUserRoleHierarchyGet"]() # Get the User Role Hierarchy list + # Send message back to client + message = json.dumps(lResultDict) + # Write content as utf-8 data + inResponseDict["Body"] = bytes(message, "utf8") + def GetScreenshot(inRequest,inGlobalDict): # Get Screenshot def SaveScreenshot(inFilePath): @@ -90,7 +100,8 @@ def SettingsUpdate(inGlobalConfiguration): {"Method":"GET", "URL": "/3rdParty/Handlebars/handlebars-v4.1.2.js", "MatchType": "EqualCase", "ResponseFilePath": os.path.join(lOrchestratorFolder, "..\\Resources\\Web\\Handlebars\\handlebars-v4.1.2.js"), "ResponseContentType": "application/javascript"}, {"Method": "GET", "URL": "/Monitor/ControlPanelDictGet", "MatchType": "Equal", "ResponseDefRequestGlobal": Monitor_ControlPanelDictGet, "ResponseContentType": "application/json"}, {"Method": "GET", "URL": "/GetScreenshot", "MatchType": "BeginWith", "ResponseDefRequestGlobal": GetScreenshot, "ResponseContentType": "image/png"}, - {"Method": "GET", "URL": "/Orchestrator/RobotRDPActive/ControlPanelDictGet", "MatchType": "Equal","ResponseDefRequestGlobal": RobotRDPActive_ControlPanelDictGet, "ResponseContentType": "application/json"} + {"Method": "GET", "URL": "/Orchestrator/RobotRDPActive/ControlPanelDictGet", "MatchType": "Equal","ResponseDefRequestGlobal": RobotRDPActive_ControlPanelDictGet, "ResponseContentType": "application/json"}, + {"Method": "POST", "URL": "/Orchestrator/UserRoleHierarchyGet", "MatchType": "Equal","ResponseDefRequestGlobal": UserRoleHierarchyGet, "ResponseContentType": "application/json"} ] inGlobalConfiguration["Server"]["URLList"]=inGlobalConfiguration["Server"]["URLList"]+lURLList return inGlobalConfiguration \ No newline at end of file diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Orchestrator/Web/Index.xhtml b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Orchestrator/Web/Index.xhtml index e64da833..48292227 100644 --- a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Orchestrator/Web/Index.xhtml +++ b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Orchestrator/Web/Index.xhtml @@ -388,37 +388,6 @@ dataType: "text" }); } - - /////////////////////////////// - ///Scheduler functions - /////////////////////////////// - - mGlobal.Scheduler = {} - mGlobal.Scheduler.ActivityTimeListShow = function() { - lData = [ - { - "Type":"GlobalDictKeyListValueGet", - "KeyList":["Scheduler","ActivityTimeList"] - } - ] - $.ajax({ - type: "POST", - url: 'Utils/Processor', - data: JSON.stringify(lData), - success: - function(lData,l2,l3) - { - var lResponseJSON=JSON.parse(lData) - lResponseJSON[0]["Result"].forEach(function(lItem){lItem["processPathName"]=("processPath" in lItem ? lItem["processPath"] : lItem["processName"])}) - ///Отправить запрос на формирование таблицы - lHTMLCode=mGlobal.GeneralGenerateHTMLCodeHandlebars(".openrpa-hidden-info-table-planloglist",lResponseJSON[0]); - ///Установить HTML код - $('.ui.modal.basic .content').html(lHTMLCode); - $('.ui.modal.basic').modal('show'); - }, - dataType: "text" - }); - } /////////////////////////////// ///Processor functions /////////////////////////////// @@ -507,32 +476,6 @@ dataType: "text" }); } - mGlobal.Processor.LogListShow = function() { - lData = [ - { - "Type":"GlobalDictKeyListValueGet", - "KeyList":["Processor","LogList"] - } - ] - ///Обнулить таблицу - $('.ui.modal.basic .content').html(""); - $.ajax({ - type: "POST", - url: 'Utils/Processor', - data: JSON.stringify(lData), - success: - function(lData,l2,l3) - { - var lResponseJSON=JSON.parse(lData) - ///Отправить запрос на формирование таблицы - lHTMLCode=mGlobal.GeneralGenerateHTMLCodeHandlebars(".openrpa-hidden-info-table-activitylogschedulelist",lResponseJSON["actionListResult"][0]) - ///Установить HTML код - $('.ui.modal.basic .content').html(lHTMLCode); - $('.ui.modal.basic').modal('show'); - }, - dataType: "text" - }); - } mGlobal.Server= {} mGlobal.Server.JSONGet=function(inMethod, inURL, inDataJSON, inCallback) { @@ -661,6 +604,37 @@ ///Установить HTML код lElementParentElement.insertAdjacentHTML("beforeend",lHTMLCode); } + // Check user roles and update the Orchestrator UI + mGlobal.UserRoleUpdate=function() { + $.ajax({ + type: "POST", + url: 'Orchestrator/UserRoleHierarchyGet', + data: "", + success: + function(lData,l2,l3) + { + var lResponseDict=JSON.parse(lData) + //Turn on the Lookmachine screenshot button + var lDict = ((lResponseDict["Orchestrator"] || {})["Controls"] || {}) // Get the Controls dict + if ("LookMachineScreenshots" in lDict || Object.keys(lDict).length == 0) { + $(".openrpa-control-lookmachinescreenshot").show() //Show button + } + //Turn on the restart orchestrator button + var lDict = ((lResponseDict["Orchestrator"] || {})["Controls"] || {}) // Get the Controls dict + if ("RestartOrchestrator" in lDict || Object.keys(lDict).length == 0) { + $(".openrpa-control-restartorchestrator").show() //Show button + } + //Turn on the rdp session list + var lDict = ((lResponseDict["Orchestrator"] || {})["RDPActive"] || {}) // Get the Controls dict + if ("ListRead" in lDict || Object.keys(lDict).length == 0) { + $(".openrpa-rdpactive-title").show() //Show section + $(".openrpa-robotrdpactive-control-panel-general").show() //Show section + } + }, + dataType: "text" + }); + } + mGlobal.UserRoleUpdate() // Cal the update User Roles function }) ; @@ -781,75 +755,20 @@

...

-

Robot RDP active list

+
- - - - @@ -781,75 +755,20 @@

...

-

Robot RDP active list

+
- - - -