New post

Rechercher

Question
· Aug 28, 2024

OPEN A TERMINAL WINDOW VIA HREF TAG IN HTML

? 4 U:

IS THERE A WAY TO OPEN THE TERMINAL WINDOW WITH INTERNAL IP AND NAMESPACE FROM HREF TAG IN AND HTML 

i KNOW I CAN CALL ON THE MANAGEMENT PORT VIA A HREF TAG:

<td><a href=""http://"_IP_":57773/csp/sys/exp/%25CSP.UI.Portal.GlobalList.zen?$NAMESPACE="_USER_"&$NAMESPACE="_USER_" id=""rr"" onclick='selectedRow()' target='_blank'>Portal</a></td>"

BUT WHATEVER I TRIED, JAVASCRIPT OR ANYTHING ELSE I CAN'T OPEN A TERMINAL WINDOW

<td><a href="??????????????????"">Terminal</a></td>

2 Comments
Discussion (2)2
Log in or sign up to continue
Question
· Aug 28, 2024

JOB $SYSTEM.obj

IS THERE A WAY TO JOB A $SYSTEM.OBJ FUNCTION AND FIND IF THE JOB IS RUNNING OR FINISHED TO ASYNCHRONOUSLY CONTINUE OR HALT THE PROCESS?

5 Comments
Discussion (5)2
Log in or sign up to continue
Question
· Aug 28, 2024

<Session disconnected> error

why do I sometime get a <Session disconnected> error when running a $system.OBJ.Export command from a *.scr script file?

Discussion (0)1
Log in or sign up to continue
Article
· Aug 28, 2024 2m read

Décompresse les rôles de manière récursive

Récemment, je me suis retrouvé dans une situation où un utilisateur avait des rôles qui lui accordaient des rôles supplémentaires, etc.

Comme je ne comprenais pas d'où venait une autorisation particulière, j'ai écrit ce code qui obtient un ensemble initial de rôles et les décompresse de manière récursive, en tenant compte des éventuelles répétitions.

/// Décompresse de manière récursive le jeu de rôles.
/// Tient compte des dépendances circulaires et des répétitions.
Class Utils.Roles
{

/// roles : chaîne de rôles séparés par des virgules
/// showResources : affiche les ressources en plus des rôles
/// do ##class(Utils.Roles).Display
ClassMethod Display(roles As %String, showResources As %Boolean = {$$$NO})
{
    new $namespace
    set $namespace = "%SYS"
    set roles = $lfs(roles)
    set i=0
    while i<$ll(roles) {
        do $i(i)
        set role = $lg(roles, i)
        continue:$d(processed(role))=1
        write "Current role: ", role,!
        
        write "Grants roles: "
        set sc = ##class(Security.Roles).Get(role, .p)
        for j=1:1:$l($g(p("GrantedRoles")),",") {
            set grantedrole = $p(p("GrantedRoles"),",", j)
            continue:grantedrole=""
            continue:$lf(roles, grantedrole)
            
            write grantedrole, ", "
            set roles = roles _ $lb(grantedrole)
        }
        
        write:showResources !, "Grants resources: ", p("Resources")
        write !
    }
}

}
 
Spoiler

Code.

Discussion (0)1
Log in or sign up to continue
Question
· Aug 28, 2024

Should JDBC queries keep a user account from expiring?

Hello all,

On one of my team's systems, we utilize a business operation with the EnsLib.SQL.OutboundAdapter to make SQL queries to another IRIS system using JDBC. To authenticate the connection, we utilize a user account on the target system.

We recently had a failure where this user account expired due to inactivity, causing all queries to error until the account was reactivated on the target system. The root cause of this was that the adapter only authenticates when the initial connection is established, and running the queries over JDBC does not reauthenticate/extend the account inactivity timeout.

Is this the intended behavior? It feels like running queries over an active connection should prevent the account from timing out. Has anyone else run into this/implemented workarounds? 

Thanks,

Nick P.

6 Comments
Discussion (6)3
Log in or sign up to continue