Disallow initiating a new Remote Access session when in Secure Mode (#17968)
Fixes #17945
Summary of the issue:
Initiating a new Remote Access session in secure mode is disallowed by the gesture, but still doable via the Remote Access menu.
The user guide now mentions that initiating new Remote Access connections is disallowed in secure mode.
Description of user facing changes
The "Connect..." item in the Remote Access menu is now disabled in Secure Mode.
Description of development approach
In the _switchToConnectItem method of Remote's Menu class, disable the connect/disconnect menuitem if we're running in secure mode. In the _switchToDisconnectItem method, always enable the connect/disconnect item, as we always want the user to be able to disconnect from a session, and enabling an already enabled menuitem is a no-op.
In RemoteClient.doConnect, check for secure mode, and, if enabled, log an error and return before allowing the user to initiate a new connection. As this method simply creates and shows the connection GUI, this blocks the user from creating a new connection, but doesn't affect the underlying machinery, which is needed to support continuing Remote Access sessions on secure screens.
Remove the secure mode check from the disconnect script, as disconnecting in secure mode is a useful escape mechanism in case of a compromised connection.
Testing strategy:
Ran NVDA from source in secure mode (-s command line flag), and checked that the "Connect..." item was not available in secure mode, before or after a connection, but that the "Disconnect" item was available when an RA session was in progress.