The master RPC procedure `get_sessions' does not respect the `username' filter parameter if asked to also verify the sessions. When telling `get_sessions' to filter by username, the reasonable behavior would be only returning sessions belonging to the specified user, regardless of whether we ask to verify the sessions or not. We now instead get different behavior depending on if we choose to validate the sessions or not. If we do not validate, we get the expected behavior. But if choose to validate, we get an unfiltered list instead (but with only the sessions belonging to the given username verified). This behavior is relied upon by tlwebadm and is not entirely unreasonable in that context since it saves us an additional `get_sessions' call. It is nonetheless poorly documented and not especially intuitive, so it should be fixed.
A fix has now been committed and I have done the following regression tests using server build #2495 running on Fedora 35: • ☑ tlwebadm → Status → Sessions shows the active sessions • ☑ tlwebadm → Status → Sessions can show details about a user's session • ☑ If the user has one active session • ☑ If the user has more than one active session • ☑ Stopping vsmagent and clicking on an entry under tlwebadm → Status → Sessions show the agent as down (i.e. the sessions are still verified). Marking as resolved!
Tested on Ubuntu 20.04 with build 2499. Started four sessions with four different users. * "tlctl session list" shows all sessions * "tlctl session list --user user1" shows just that session * tlwebadm shows all sessions * getting details for a session in tlwebadm works, and still shows the other sessions * "tlctl session terminate --user user1" shows just that session, and only kills that session * "tlctl session terminate --all" shows all sessions, kills them all Code and tests looks good.