Files
teleport/lib
Isaiah Becker-Mayer e2df4a31ba Fix incorrect login options for Windows Desktops (#22118)
* Removes desktop logins from the ACL and adds them to each Desktop resource
as returned to the frontend. This behavior parallels what's currently being
done with other similar resources such as Nodes, and fixes a bug where
users were able to see all the logins permitted by their roles on every
desktop "connect" dropdown, even if the role permitting that login didn't
apply to a given desktop.

* Extracts common logic out of GetWindowsDesktopLogins (now GetAllowedWindowsDesktopLogins), uses it to create a GetAllowedServerLogins as well, tests both of them together, removing EnumerateServerLogins

* reduce unnecessary looping by using maps

* fixes flakiness by sorting lists

* uses require.ElementsMatch rather than manually sorting lists

* consolidates duplicated logic

* Consolidates separate server and desktop logic into a single GetAllowedLoginsForResource

* fixes tests

* fixes import order and test
2023-02-24 21:06:38 +00:00
..
2023-02-08 17:21:11 +00:00
2022-10-28 20:20:28 +00:00
…
2023-02-08 17:21:11 +00:00
2022-10-28 20:20:28 +00:00
2022-11-04 15:46:46 +00:00
2022-10-28 20:20:28 +00:00
2022-10-28 20:20:28 +00:00
2022-11-01 12:15:10 +00:00
2022-10-28 20:20:28 +00:00
2022-10-28 20:20:28 +00:00