@ -389,6 +389,7 @@ $(document).ready(function() {
mGlobal . pyOpenRPA . ServerDataDict = lResponseJSON [ "ServerDataDict" ]
mGlobal . pyOpenRPA . ServerDataHashStr = lResponseJSON [ "HashStr" ]
mGlobal . pyOpenRPA . ServerDataRefreshDef _TechnicalRender ( )
mGlobal . UserRoleUpdate ( ) ;
}
catch ( error ) {
}
@ -745,7 +746,7 @@ $(document).ready(function() {
// UAC Ask
mGlobal . UserRoleAsk = function ( inList ) {
var lResult = true ; // Init flag
var lRoleHierarchyDict = mGlobal . UserRoleHierarchy Dict; // get the Hierarchy
var lRoleHierarchyDict = mGlobal . pyOpenRPA. ServerDataDict . UserDict . UACClient Dict; // get the Hierarchy
// Try to get value from key list
var lKeyValue = lRoleHierarchyDict ; // Init the base
var lListLength = inList . length ;
@ -771,42 +772,25 @@ $(document).ready(function() {
}
// Check user roles and update the Orchestrator UI
mGlobal . UserRoleUpdate = function ( ) {
$ . ajax ( {
type : "POST" ,
url : 'Orchestrator/UserRoleHierarchyGet' ,
data : "" ,
success :
function ( lData , l2 , l3 )
{
var lUACAsk = mGlobal . UserRoleAsk // Alias
var lResponseDict = JSON . parse ( lData )
mGlobal . UserRoleHierarchyDict = lResponseDict // set the user role hierarchy
//Turn on the Lookmachine screenshot button
if ( lUACAsk ( [ "Orchestrator" , "Controls" , "LookMachineScreenshots" ] ) ) {
$ ( ".openrpa-control-lookmachinescreenshot" ) . show ( ) //Show button
}
//Turn on the restart orchestrator button
if ( lUACAsk ( [ "Orchestrator" , "Controls" , "RestartOrchestrator" ] ) ) {
$ ( ".openrpa-control-restartorchestrator" ) . show ( ) //Show button
}
//Turn on the rdp session list
if ( lUACAsk ( [ "Orchestrator" , "RDPActive" , "ListRead" ] ) ) {
$ ( ".openrpa-rdpactive-title" ) . show ( ) //Show section
$ ( ".openrpa-robotrdpactive-control-panel-general" ) . show ( ) //Show section
}
//Turn on the restart PC button
if ( lUACAsk ( [ "Orchestrator" , "Controls" , "RestartPC" ] ) ) {
$ ( ".openrpa-control-restartpc" ) . show ( ) //Show button
}
//Turn on the git update + restart orchestrator
if ( lUACAsk ( [ "Orchestrator" , "Controls" , "GITRestartOrchestrator" ] ) ) {
$ ( ".openrpa-control-gitrestartorchestrator" ) . show ( ) //Show button
}
} ,
dataType : "text"
} ) ;
var lUACAsk = mGlobal . UserRoleAsk // Alias
//CPKeyDict
if ( lUACAsk ( [ "pyOpenRPADict" , "CPKeyDict" ] ) ) { $ ( ".UACClient-pyOpenRPADict-CPKeyDict" ) . show ( ) ; }
//RDPKeyDict
if ( lUACAsk ( [ "pyOpenRPADict" , "RDPKeyDict" ] ) ) { $ ( ".UACClient-pyOpenRPADict-RDPKeyDict" ) . show ( ) ; }
//AgentKeyDict
if ( lUACAsk ( [ "pyOpenRPADict" , "AgentKeyDict" ] ) ) { $ ( ".UACClient-pyOpenRPADict-AgentKeyDict" ) . show ( ) ; }
// AdminDict
if ( lUACAsk ( [ "pyOpenRPADict" , "AdminDict" , "LogViewerBool" ] ) ) { $ ( ".UACClient-pyOpenRPADict-AdminDict-LogViewerBool" ) . show ( ) ; }
if ( lUACAsk ( [ "pyOpenRPADict" , "AdminDict" , "CMDInputBool" ] ) ) { $ ( ".UACClient-pyOpenRPADict-AdminDict-CMDInputBool" ) . show ( ) ; }
if ( lUACAsk ( [ "pyOpenRPADict" , "AdminDict" , "ScreenshotViewerBool" ] ) ) { $ ( ".UACClient-pyOpenRPADict-AdminDict-ScreenshotViewerBool" ) . show ( ) ; }
if ( lUACAsk ( [ "pyOpenRPADict" , "AdminDict" , "RestartOrchestratorBool" ] ) ) { $ ( ".UACClient-pyOpenRPADict-AdminDict-RestartOrchestratorBool" ) . show ( ) ; }
if ( lUACAsk ( [ "pyOpenRPADict" , "AdminDict" , "RestartOrchestratorGITPullBool" ] ) ) { $ ( ".UACClient-pyOpenRPADict-AdminDict-RestartOrchestratorGITPullBool" ) . show ( ) ; }
if ( lUACAsk ( [ "pyOpenRPADict" , "AdminDict" , "RestartPCBool" ] ) ) { $ ( ".UACClient-pyOpenRPADict-AdminDict-RestartPCBool" ) . show ( ) ; }
}
mGlobal . UserRoleUpdate ( ) // Cal the update User Roles function
// Orchestrator model
mGlobal . WorkingDirectoryPathStr = null
mGlobal . OrchestratorModelUpdate = function ( ) {