Hidden change of $UserName
This is more a WARNING than a question
In a default installation I see this behaviour:
prick
USER>w $system.Process.UserName()
prick
USER>
until a re-install (not upgrade) to a new version
prick@workgroup.com
USER>w $system.Process.UserName()
prick
USER>
you might easy understand the confusion this caused as $USERNAME is my preferred item to check, display, ...
with help of WRC it turned out that it was cause of a system wide setting.
System > Security Management > System-wide Security Parameters
http://localhost:57772/csp/sys/sec/%25CSP.UI.Portal.Parameters.zen
Removing the hook returned me to default behaviour
Needless to say that I could't find any docs on this unexpected surprise.
So be warned !
Comments
Thanks for sharing Paul.
Though reference article for $username has this documented:
$USERNAME contains the username for the current process. This can be in one of two forms:
- The name of the current user; for example: Mary. This value is returned if multiple security domains are not allowed.
- The name and system address of the current user; for example: Mary@jupiter. This value is returned if multiple security domains are allowed.
To allow multiple security domains, go to the Management Portal, select System Administration, Security, System Security, System-wide Security Parameters. Select the Allow multiple security domains check box. Changes to this setting apply to new invoked processes; changing it does not affect the value returned by the current process.
https://cedocs.intersystems.com/ens201813/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_vusername
Paul's warning sounded like this setting changed after the instance re-installation, while it unlikely could, as even in IRIS, according to docs:
System-Wide Security Parameters
Allow multiple security domains ... [Default is a single domain]