# Minor fixes in UAC User-Role models (back + front tested)

dev-linux
Ivan Maslov 4 years ago
parent cb1610eb97
commit 1640a8f317

@ -1,6 +1,6 @@
Metadata-Version: 2.1 Metadata-Version: 2.1
Name: pyOpenRPA Name: pyOpenRPA
Version: 1.1.11 Version: 1.1.12
Summary: First open source RPA platform for business Summary: First open source RPA platform for business
Home-page: https://gitlab.com/UnicodeLabs/OpenRPA Home-page: https://gitlab.com/UnicodeLabs/OpenRPA
Author: Ivan Maslov Author: Ivan Maslov

@ -1,8 +1,8 @@
pyOpenRPA-1.1.11.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 pyOpenRPA-1.1.12.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
pyOpenRPA-1.1.11.dist-info/METADATA,sha256=p8sn27Umq6fB2OiMoHNu0h5FGfWehuKswBxrUB9C80E,3542 pyOpenRPA-1.1.12.dist-info/METADATA,sha256=QQ3aid4fLcFpJ0aWDRyYrVf1EMWi3cYocTyqvmHwJ90,3542
pyOpenRPA-1.1.11.dist-info/RECORD,, pyOpenRPA-1.1.12.dist-info/RECORD,,
pyOpenRPA-1.1.11.dist-info/WHEEL,sha256=qB97nP5e4MrOsXW5bIU5cUn_KSVr10EV0l-GCHG9qNs,97 pyOpenRPA-1.1.12.dist-info/WHEEL,sha256=qB97nP5e4MrOsXW5bIU5cUn_KSVr10EV0l-GCHG9qNs,97
pyOpenRPA-1.1.11.dist-info/top_level.txt,sha256=RPzwQXgYBRo_m5L3ZLs6Voh8aEkMeT29Xsul1w1qE0g,10 pyOpenRPA-1.1.12.dist-info/top_level.txt,sha256=RPzwQXgYBRo_m5L3ZLs6Voh8aEkMeT29Xsul1w1qE0g,10
pyOpenRPA/.idea/inspectionProfiles/profiles_settings.xml,sha256=YXLFmX7rPNGcnKK1uX1uKYPN0fpgskYNe7t0BV7cqkY,174 pyOpenRPA/.idea/inspectionProfiles/profiles_settings.xml,sha256=YXLFmX7rPNGcnKK1uX1uKYPN0fpgskYNe7t0BV7cqkY,174
pyOpenRPA/.idea/misc.xml,sha256=ySjeaQ1DfqxaRTlFGT_3zW5r9mWuwxoAK_AX4QiuAZM,203 pyOpenRPA/.idea/misc.xml,sha256=ySjeaQ1DfqxaRTlFGT_3zW5r9mWuwxoAK_AX4QiuAZM,203
pyOpenRPA/.idea/modules.xml,sha256=Q__U1JIA2cjxbLRXAv-SfYY00fZA0TNlpkkbY4s3ncg,277 pyOpenRPA/.idea/modules.xml,sha256=Q__U1JIA2cjxbLRXAv-SfYY00fZA0TNlpkkbY4s3ncg,277
@ -34,9 +34,9 @@ pyOpenRPA/Orchestrator/RobotRDPActive/__pycache__/Timer.cpython-37.pyc,,
pyOpenRPA/Orchestrator/RobotRDPActive/__pycache__/__init__.cpython-37.pyc,, pyOpenRPA/Orchestrator/RobotRDPActive/__pycache__/__init__.cpython-37.pyc,,
pyOpenRPA/Orchestrator/RobotRDPActive/__pycache__/__main__.cpython-37.pyc,, pyOpenRPA/Orchestrator/RobotRDPActive/__pycache__/__main__.cpython-37.pyc,,
pyOpenRPA/Orchestrator/Server.py,sha256=F7AZX_5n1EPY0dD4vTH90sR-x3nM41Qv3j3Qcba_W1w,25356 pyOpenRPA/Orchestrator/Server.py,sha256=F7AZX_5n1EPY0dD4vTH90sR-x3nM41Qv3j3Qcba_W1w,25356
pyOpenRPA/Orchestrator/ServerSettings.py,sha256=pMe8m_l41_rUanZ32DBwwA3K53H5R6qVlFzeNc9czD8,8408 pyOpenRPA/Orchestrator/ServerSettings.py,sha256=8Y6uqYIevE_VCNF5exiDMKfZ74YuYJJzagrtHjM2jNs,8419
pyOpenRPA/Orchestrator/Timer.py,sha256=HvYtEeH2Q5WVVjgds9XaBpWRmvZgwgBXurJDdVVq_T0,2097 pyOpenRPA/Orchestrator/Timer.py,sha256=HvYtEeH2Q5WVVjgds9XaBpWRmvZgwgBXurJDdVVq_T0,2097
pyOpenRPA/Orchestrator/Web/Index.xhtml,sha256=EFW6jPs0trHyQeKtJ8hKEEeZN9JBBkIJpjfpSI6b0Qs,36442 pyOpenRPA/Orchestrator/Web/Index.xhtml,sha256=5yakmckWxrwz_HKjUmYOCQaO7mJmKTl9r9k_kDV0eCY,37432
pyOpenRPA/Orchestrator/Web/favicon.ico,sha256=0vdsnwKGh6pgB0FDB5mOKO7RwbxQ9F13Zg16F1pkvXs,5430 pyOpenRPA/Orchestrator/Web/favicon.ico,sha256=0vdsnwKGh6pgB0FDB5mOKO7RwbxQ9F13Zg16F1pkvXs,5430
pyOpenRPA/Orchestrator/__init__.py,sha256=qVH8fEPgXk54rmy-ol0PnT8GF5OlGE0a8mExwJ4tFqY,124 pyOpenRPA/Orchestrator/__init__.py,sha256=qVH8fEPgXk54rmy-ol0PnT8GF5OlGE0a8mExwJ4tFqY,124
pyOpenRPA/Orchestrator/__main__.py,sha256=cOd8WU77VGgzTZUB0WmWpPmdYyMZY1zVyuU9yx26MKs,144 pyOpenRPA/Orchestrator/__main__.py,sha256=cOd8WU77VGgzTZUB0WmWpPmdYyMZY1zVyuU9yx26MKs,144
@ -300,6 +300,6 @@ pyOpenRPA/Tools/Terminator.py,sha256=VcjX3gFXiCGu3MMCidhrTNsmC9wsAqfjRJdTSU9fLnU
pyOpenRPA/Tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 pyOpenRPA/Tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pyOpenRPA/Tools/__pycache__/Terminator.cpython-37.pyc,, pyOpenRPA/Tools/__pycache__/Terminator.cpython-37.pyc,,
pyOpenRPA/Tools/__pycache__/__init__.cpython-37.pyc,, pyOpenRPA/Tools/__pycache__/__init__.cpython-37.pyc,,
pyOpenRPA/__init__.py,sha256=HQmhQ-F7xF6tmYmLAdvymW8K-sNHnxxvfz0orW6ChqY,175 pyOpenRPA/__init__.py,sha256=4A8Uettbe_avfR459RgVJNkUxs-2hHjTgSVKpVOFjKw,175
pyOpenRPA/__pycache__/__init__.cpython-37.pyc,, pyOpenRPA/__pycache__/__init__.cpython-37.pyc,,
pyOpenRPA/test.txt,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 pyOpenRPA/test.txt,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0

@ -43,7 +43,7 @@ def Monitor_ControlPanelDictGet(inRequest,inGlobalDict):
# Call def (inRequest, inGSettings) or def (inGSettings) # Call def (inRequest, inGSettings) or def (inGSettings)
lItemResultDict = None lItemResultDict = None
lDEFSignature = signature(lItem["RenderFunction"]) # Get signature of the def lDEFSignature = signature(lItem["RenderFunction"]) # Get signature of the def
lDEFARGLen = len(lDEFSignature.keys()) # get count of the def args lDEFARGLen = len(lDEFSignature.parameters.keys()) # get count of the def args
if lDEFARGLen == 1: # def (inGSettings) if lDEFARGLen == 1: # def (inGSettings)
lItemResultDict = lItem["RenderFunction"](inGlobalDict) lItemResultDict = lItem["RenderFunction"](inGlobalDict)
elif lDEFARGLen == 2: # def (inRequest, inGSettings) elif lDEFARGLen == 2: # def (inRequest, inGSettings)

@ -604,6 +604,34 @@
///Установить HTML код ///Установить HTML код
lElementParentElement.insertAdjacentHTML("beforeend",lHTMLCode); lElementParentElement.insertAdjacentHTML("beforeend",lHTMLCode);
} }
mGlobal.UserRoleHierarchyDict = null // Put here the user role hierarchy
// UAC Ask
mGlobal.UserRoleAsk=function(inList) {
var lResult = true; // Init flag
var lRoleHierarchyDict = mGlobal.UserRoleHierarchyDict; // get the Hierarchy
// Try to get value from key list
var lKeyValue = lRoleHierarchyDict; // Init the base
var lListLength = inList.length;
for (var i = 0; i<lListLength; i++) {
var lItem = inList[i]; // get the item
if (typeof lKeyValue == "object") {
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 (Object.keys(lKeyValue).length > 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
}
// Check user roles and update the Orchestrator UI // Check user roles and update the Orchestrator UI
mGlobal.UserRoleUpdate=function() { mGlobal.UserRoleUpdate=function() {
$.ajax({ $.ajax({
@ -613,20 +641,19 @@
success: success:
function(lData,l2,l3) function(lData,l2,l3)
{ {
var lUACAsk = mGlobal.UserRoleAsk // Alias
var lResponseDict=JSON.parse(lData) var lResponseDict=JSON.parse(lData)
mGlobal.UserRoleHierarchyDict = lResponseDict // set the user role hierarchy
//Turn on the Lookmachine screenshot button //Turn on the Lookmachine screenshot button
var lDict = ((lResponseDict["Orchestrator"] || {})["Controls"] || {}) // Get the Controls dict if (lUACAsk(["Orchestrator","Controls","LookMachineScreenshots"])) {
if ("LookMachineScreenshots" in lDict || Object.keys(lDict).length == 0) {
$(".openrpa-control-lookmachinescreenshot").show() //Show button $(".openrpa-control-lookmachinescreenshot").show() //Show button
} }
//Turn on the restart orchestrator button //Turn on the restart orchestrator button
var lDict = ((lResponseDict["Orchestrator"] || {})["Controls"] || {}) // Get the Controls dict if (lUACAsk(["Orchestrator","Controls","RestartOrchestrator"])) {
if ("RestartOrchestrator" in lDict || Object.keys(lDict).length == 0) {
$(".openrpa-control-restartorchestrator").show() //Show button $(".openrpa-control-restartorchestrator").show() //Show button
} }
//Turn on the rdp session list //Turn on the rdp session list
var lDict = ((lResponseDict["Orchestrator"] || {})["RDPActive"] || {}) // Get the Controls dict if (lUACAsk(["Orchestrator","RDPActive","ListRead"])) {
if ("ListRead" in lDict || Object.keys(lDict).length == 0) {
$(".openrpa-rdpactive-title").show() //Show section $(".openrpa-rdpactive-title").show() //Show section
$(".openrpa-robotrdpactive-control-panel-general").show() //Show section $(".openrpa-robotrdpactive-control-panel-general").show() //Show section
} }

@ -3,7 +3,7 @@ r"""
The OpenRPA package (from UnicodeLabs) The OpenRPA package (from UnicodeLabs)
""" """
__version__ = 'v1.1.11' __version__ = 'v1.1.12'
__all__ = [] __all__ = []
__author__ = 'Ivan Maslov <ivan.maslov@unicodelabs.ru>' __author__ = 'Ivan Maslov <ivan.maslov@unicodelabs.ru>'
#from .Core import Robot #from .Core import Robot

@ -1,6 +1,6 @@
Metadata-Version: 2.1 Metadata-Version: 2.1
Name: pyOpenRPA Name: pyOpenRPA
Version: 1.1.11 Version: 1.1.12
Summary: First open source RPA platform for business Summary: First open source RPA platform for business
Home-page: https://gitlab.com/UnicodeLabs/OpenRPA Home-page: https://gitlab.com/UnicodeLabs/OpenRPA
Author: Ivan Maslov Author: Ivan Maslov

@ -1,8 +1,8 @@
pyOpenRPA-1.1.11.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 pyOpenRPA-1.1.12.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
pyOpenRPA-1.1.11.dist-info/METADATA,sha256=p8sn27Umq6fB2OiMoHNu0h5FGfWehuKswBxrUB9C80E,3542 pyOpenRPA-1.1.12.dist-info/METADATA,sha256=QQ3aid4fLcFpJ0aWDRyYrVf1EMWi3cYocTyqvmHwJ90,3542
pyOpenRPA-1.1.11.dist-info/RECORD,, pyOpenRPA-1.1.12.dist-info/RECORD,,
pyOpenRPA-1.1.11.dist-info/WHEEL,sha256=qB97nP5e4MrOsXW5bIU5cUn_KSVr10EV0l-GCHG9qNs,97 pyOpenRPA-1.1.12.dist-info/WHEEL,sha256=qB97nP5e4MrOsXW5bIU5cUn_KSVr10EV0l-GCHG9qNs,97
pyOpenRPA-1.1.11.dist-info/top_level.txt,sha256=RPzwQXgYBRo_m5L3ZLs6Voh8aEkMeT29Xsul1w1qE0g,10 pyOpenRPA-1.1.12.dist-info/top_level.txt,sha256=RPzwQXgYBRo_m5L3ZLs6Voh8aEkMeT29Xsul1w1qE0g,10
pyOpenRPA/.idea/inspectionProfiles/profiles_settings.xml,sha256=YXLFmX7rPNGcnKK1uX1uKYPN0fpgskYNe7t0BV7cqkY,174 pyOpenRPA/.idea/inspectionProfiles/profiles_settings.xml,sha256=YXLFmX7rPNGcnKK1uX1uKYPN0fpgskYNe7t0BV7cqkY,174
pyOpenRPA/.idea/misc.xml,sha256=ySjeaQ1DfqxaRTlFGT_3zW5r9mWuwxoAK_AX4QiuAZM,203 pyOpenRPA/.idea/misc.xml,sha256=ySjeaQ1DfqxaRTlFGT_3zW5r9mWuwxoAK_AX4QiuAZM,203
pyOpenRPA/.idea/modules.xml,sha256=Q__U1JIA2cjxbLRXAv-SfYY00fZA0TNlpkkbY4s3ncg,277 pyOpenRPA/.idea/modules.xml,sha256=Q__U1JIA2cjxbLRXAv-SfYY00fZA0TNlpkkbY4s3ncg,277
@ -34,9 +34,9 @@ pyOpenRPA/Orchestrator/RobotRDPActive/__pycache__/Timer.cpython-37.pyc,,
pyOpenRPA/Orchestrator/RobotRDPActive/__pycache__/__init__.cpython-37.pyc,, pyOpenRPA/Orchestrator/RobotRDPActive/__pycache__/__init__.cpython-37.pyc,,
pyOpenRPA/Orchestrator/RobotRDPActive/__pycache__/__main__.cpython-37.pyc,, pyOpenRPA/Orchestrator/RobotRDPActive/__pycache__/__main__.cpython-37.pyc,,
pyOpenRPA/Orchestrator/Server.py,sha256=F7AZX_5n1EPY0dD4vTH90sR-x3nM41Qv3j3Qcba_W1w,25356 pyOpenRPA/Orchestrator/Server.py,sha256=F7AZX_5n1EPY0dD4vTH90sR-x3nM41Qv3j3Qcba_W1w,25356
pyOpenRPA/Orchestrator/ServerSettings.py,sha256=pMe8m_l41_rUanZ32DBwwA3K53H5R6qVlFzeNc9czD8,8408 pyOpenRPA/Orchestrator/ServerSettings.py,sha256=8Y6uqYIevE_VCNF5exiDMKfZ74YuYJJzagrtHjM2jNs,8419
pyOpenRPA/Orchestrator/Timer.py,sha256=HvYtEeH2Q5WVVjgds9XaBpWRmvZgwgBXurJDdVVq_T0,2097 pyOpenRPA/Orchestrator/Timer.py,sha256=HvYtEeH2Q5WVVjgds9XaBpWRmvZgwgBXurJDdVVq_T0,2097
pyOpenRPA/Orchestrator/Web/Index.xhtml,sha256=EFW6jPs0trHyQeKtJ8hKEEeZN9JBBkIJpjfpSI6b0Qs,36442 pyOpenRPA/Orchestrator/Web/Index.xhtml,sha256=5yakmckWxrwz_HKjUmYOCQaO7mJmKTl9r9k_kDV0eCY,37432
pyOpenRPA/Orchestrator/Web/favicon.ico,sha256=0vdsnwKGh6pgB0FDB5mOKO7RwbxQ9F13Zg16F1pkvXs,5430 pyOpenRPA/Orchestrator/Web/favicon.ico,sha256=0vdsnwKGh6pgB0FDB5mOKO7RwbxQ9F13Zg16F1pkvXs,5430
pyOpenRPA/Orchestrator/__init__.py,sha256=qVH8fEPgXk54rmy-ol0PnT8GF5OlGE0a8mExwJ4tFqY,124 pyOpenRPA/Orchestrator/__init__.py,sha256=qVH8fEPgXk54rmy-ol0PnT8GF5OlGE0a8mExwJ4tFqY,124
pyOpenRPA/Orchestrator/__main__.py,sha256=cOd8WU77VGgzTZUB0WmWpPmdYyMZY1zVyuU9yx26MKs,144 pyOpenRPA/Orchestrator/__main__.py,sha256=cOd8WU77VGgzTZUB0WmWpPmdYyMZY1zVyuU9yx26MKs,144
@ -300,6 +300,6 @@ pyOpenRPA/Tools/Terminator.py,sha256=VcjX3gFXiCGu3MMCidhrTNsmC9wsAqfjRJdTSU9fLnU
pyOpenRPA/Tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 pyOpenRPA/Tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pyOpenRPA/Tools/__pycache__/Terminator.cpython-37.pyc,, pyOpenRPA/Tools/__pycache__/Terminator.cpython-37.pyc,,
pyOpenRPA/Tools/__pycache__/__init__.cpython-37.pyc,, pyOpenRPA/Tools/__pycache__/__init__.cpython-37.pyc,,
pyOpenRPA/__init__.py,sha256=HQmhQ-F7xF6tmYmLAdvymW8K-sNHnxxvfz0orW6ChqY,175 pyOpenRPA/__init__.py,sha256=4A8Uettbe_avfR459RgVJNkUxs-2hHjTgSVKpVOFjKw,175
pyOpenRPA/__pycache__/__init__.cpython-37.pyc,, pyOpenRPA/__pycache__/__init__.cpython-37.pyc,,
pyOpenRPA/test.txt,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 pyOpenRPA/test.txt,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0

@ -43,7 +43,7 @@ def Monitor_ControlPanelDictGet(inRequest,inGlobalDict):
# Call def (inRequest, inGSettings) or def (inGSettings) # Call def (inRequest, inGSettings) or def (inGSettings)
lItemResultDict = None lItemResultDict = None
lDEFSignature = signature(lItem["RenderFunction"]) # Get signature of the def lDEFSignature = signature(lItem["RenderFunction"]) # Get signature of the def
lDEFARGLen = len(lDEFSignature.keys()) # get count of the def args lDEFARGLen = len(lDEFSignature.parameters.keys()) # get count of the def args
if lDEFARGLen == 1: # def (inGSettings) if lDEFARGLen == 1: # def (inGSettings)
lItemResultDict = lItem["RenderFunction"](inGlobalDict) lItemResultDict = lItem["RenderFunction"](inGlobalDict)
elif lDEFARGLen == 2: # def (inRequest, inGSettings) elif lDEFARGLen == 2: # def (inRequest, inGSettings)

@ -604,6 +604,34 @@
///Установить HTML код ///Установить HTML код
lElementParentElement.insertAdjacentHTML("beforeend",lHTMLCode); lElementParentElement.insertAdjacentHTML("beforeend",lHTMLCode);
} }
mGlobal.UserRoleHierarchyDict = null // Put here the user role hierarchy
// UAC Ask
mGlobal.UserRoleAsk=function(inList) {
var lResult = true; // Init flag
var lRoleHierarchyDict = mGlobal.UserRoleHierarchyDict; // get the Hierarchy
// Try to get value from key list
var lKeyValue = lRoleHierarchyDict; // Init the base
var lListLength = inList.length;
for (var i = 0; i<lListLength; i++) {
var lItem = inList[i]; // get the item
if (typeof lKeyValue == "object") {
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 (Object.keys(lKeyValue).length > 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
}
// Check user roles and update the Orchestrator UI // Check user roles and update the Orchestrator UI
mGlobal.UserRoleUpdate=function() { mGlobal.UserRoleUpdate=function() {
$.ajax({ $.ajax({
@ -613,20 +641,19 @@
success: success:
function(lData,l2,l3) function(lData,l2,l3)
{ {
var lUACAsk = mGlobal.UserRoleAsk // Alias
var lResponseDict=JSON.parse(lData) var lResponseDict=JSON.parse(lData)
mGlobal.UserRoleHierarchyDict = lResponseDict // set the user role hierarchy
//Turn on the Lookmachine screenshot button //Turn on the Lookmachine screenshot button
var lDict = ((lResponseDict["Orchestrator"] || {})["Controls"] || {}) // Get the Controls dict if (lUACAsk(["Orchestrator","Controls","LookMachineScreenshots"])) {
if ("LookMachineScreenshots" in lDict || Object.keys(lDict).length == 0) {
$(".openrpa-control-lookmachinescreenshot").show() //Show button $(".openrpa-control-lookmachinescreenshot").show() //Show button
} }
//Turn on the restart orchestrator button //Turn on the restart orchestrator button
var lDict = ((lResponseDict["Orchestrator"] || {})["Controls"] || {}) // Get the Controls dict if (lUACAsk(["Orchestrator","Controls","RestartOrchestrator"])) {
if ("RestartOrchestrator" in lDict || Object.keys(lDict).length == 0) {
$(".openrpa-control-restartorchestrator").show() //Show button $(".openrpa-control-restartorchestrator").show() //Show button
} }
//Turn on the rdp session list //Turn on the rdp session list
var lDict = ((lResponseDict["Orchestrator"] || {})["RDPActive"] || {}) // Get the Controls dict if (lUACAsk(["Orchestrator","RDPActive","ListRead"])) {
if ("ListRead" in lDict || Object.keys(lDict).length == 0) {
$(".openrpa-rdpactive-title").show() //Show section $(".openrpa-rdpactive-title").show() //Show section
$(".openrpa-robotrdpactive-control-panel-general").show() //Show section $(".openrpa-robotrdpactive-control-panel-general").show() //Show section
} }

@ -3,7 +3,7 @@ r"""
The OpenRPA package (from UnicodeLabs) The OpenRPA package (from UnicodeLabs)
""" """
__version__ = 'v1.1.11' __version__ = 'v1.1.12'
__all__ = [] __all__ = []
__author__ = 'Ivan Maslov <ivan.maslov@unicodelabs.ru>' __author__ = 'Ivan Maslov <ivan.maslov@unicodelabs.ru>'
#from .Core import Robot #from .Core import Robot

@ -43,7 +43,7 @@ def Monitor_ControlPanelDictGet(inRequest,inGlobalDict):
# Call def (inRequest, inGSettings) or def (inGSettings) # Call def (inRequest, inGSettings) or def (inGSettings)
lItemResultDict = None lItemResultDict = None
lDEFSignature = signature(lItem["RenderFunction"]) # Get signature of the def lDEFSignature = signature(lItem["RenderFunction"]) # Get signature of the def
lDEFARGLen = len(lDEFSignature.keys()) # get count of the def args lDEFARGLen = len(lDEFSignature.parameters.keys()) # get count of the def args
if lDEFARGLen == 1: # def (inGSettings) if lDEFARGLen == 1: # def (inGSettings)
lItemResultDict = lItem["RenderFunction"](inGlobalDict) lItemResultDict = lItem["RenderFunction"](inGlobalDict)
elif lDEFARGLen == 2: # def (inRequest, inGSettings) elif lDEFARGLen == 2: # def (inRequest, inGSettings)

@ -604,6 +604,34 @@
///Установить HTML код ///Установить HTML код
lElementParentElement.insertAdjacentHTML("beforeend",lHTMLCode); lElementParentElement.insertAdjacentHTML("beforeend",lHTMLCode);
} }
mGlobal.UserRoleHierarchyDict = null // Put here the user role hierarchy
// UAC Ask
mGlobal.UserRoleAsk=function(inList) {
var lResult = true; // Init flag
var lRoleHierarchyDict = mGlobal.UserRoleHierarchyDict; // get the Hierarchy
// Try to get value from key list
var lKeyValue = lRoleHierarchyDict; // Init the base
var lListLength = inList.length;
for (var i = 0; i<lListLength; i++) {
var lItem = inList[i]; // get the item
if (typeof lKeyValue == "object") {
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 (Object.keys(lKeyValue).length > 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
}
// Check user roles and update the Orchestrator UI // Check user roles and update the Orchestrator UI
mGlobal.UserRoleUpdate=function() { mGlobal.UserRoleUpdate=function() {
$.ajax({ $.ajax({
@ -613,20 +641,19 @@
success: success:
function(lData,l2,l3) function(lData,l2,l3)
{ {
var lUACAsk = mGlobal.UserRoleAsk // Alias
var lResponseDict=JSON.parse(lData) var lResponseDict=JSON.parse(lData)
mGlobal.UserRoleHierarchyDict = lResponseDict // set the user role hierarchy
//Turn on the Lookmachine screenshot button //Turn on the Lookmachine screenshot button
var lDict = ((lResponseDict["Orchestrator"] || {})["Controls"] || {}) // Get the Controls dict if (lUACAsk(["Orchestrator","Controls","LookMachineScreenshots"])) {
if ("LookMachineScreenshots" in lDict || Object.keys(lDict).length == 0) {
$(".openrpa-control-lookmachinescreenshot").show() //Show button $(".openrpa-control-lookmachinescreenshot").show() //Show button
} }
//Turn on the restart orchestrator button //Turn on the restart orchestrator button
var lDict = ((lResponseDict["Orchestrator"] || {})["Controls"] || {}) // Get the Controls dict if (lUACAsk(["Orchestrator","Controls","RestartOrchestrator"])) {
if ("RestartOrchestrator" in lDict || Object.keys(lDict).length == 0) {
$(".openrpa-control-restartorchestrator").show() //Show button $(".openrpa-control-restartorchestrator").show() //Show button
} }
//Turn on the rdp session list //Turn on the rdp session list
var lDict = ((lResponseDict["Orchestrator"] || {})["RDPActive"] || {}) // Get the Controls dict if (lUACAsk(["Orchestrator","RDPActive","ListRead"])) {
if ("ListRead" in lDict || Object.keys(lDict).length == 0) {
$(".openrpa-rdpactive-title").show() //Show section $(".openrpa-rdpactive-title").show() //Show section
$(".openrpa-robotrdpactive-control-panel-general").show() //Show section $(".openrpa-robotrdpactive-control-panel-general").show() //Show section
} }

@ -3,7 +3,7 @@ r"""
The OpenRPA package (from UnicodeLabs) The OpenRPA package (from UnicodeLabs)
""" """
__version__ = 'v1.1.11' __version__ = 'v1.1.12'
__all__ = [] __all__ = []
__author__ = 'Ivan Maslov <ivan.maslov@unicodelabs.ru>' __author__ = 'Ivan Maslov <ivan.maslov@unicodelabs.ru>'
#from .Core import Robot #from .Core import Robot
Loading…
Cancel
Save