Skip to content

Conversation

@emmalion93
Copy link

What does this PR do?

Fixes an issue where "My Virtual Desktop" view incorrectly showing all Virtual Desktops whose "owner" field contained the user's username. For example, user min can view all of user Clusteradmin's Virtual Desktops, regardless of permissions.

Issue:

Clusteradmin user's "My Virtual Desktop" view correctly shows the Virtual Desktop launched by the Clusteradmin user:

Screenshot_2025-07-25_at_10 41 04_AM

min user's "My Virtual Desktop" view incorrectly shows the Virtual Desktop deployed by the Clusteradmin user

Screenshot_2025-07-25_at_10 41 40_AM

Change log:

  • Replaced value filter for the owner field with eq filter in the list_all_for_user function.
  • Added additional owner filtering in the fetchUserSessions function.

How was this PR tested?

Manual test:

  • Deploy a new AWS RES instance using this branch.
  • Created a new project and added a software stack using the AWS RES UI
  • Launched a new virtual desktop using the Clusteradmin account
  • Created an additional Cognito user named min and synced the changes in the Cognito Database with AWS RES using the cognito-sync-lambda
  • Logged in using the min username and password
  • Verified that the min user's "My Virtual Desktop" view did not show the Clusteradmin user's Virtual Desktop

Clusteradmin "My Virtual Desktop" view:

Screenshot_2025-07-25_at_10 41 04_AM (1)

min "My Virtual Desktop" view:

Screenshot_2025-07-25_at_10 43 23_AM

License

Please review the guidelines for contributing and Pull Request Instructions.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.te this contribution, under the terms of your choice.

Replaced `value` filter for the `owner` field with `eq` filter in the `list_all_for_user` function. Added additional `owner` filtering in `fetchUserSessions` function.

"My Virtual Desktop" view incorrectly showed all Virtual Desktops whose "owner" field contained the user's username. For example, user `an` can view all of user `ryan`'s Virtual Desktops, regardless of user's permissions.
@electroniceagle
Copy link

@emmalion93 did you create an issue to document the bug? I believe that is the first step in the contribution guidelines.

@emmalion93
Copy link
Author

emmalion93 commented Aug 19, 2025

@electroniceagle It looks like something went wrong when we originally tried to submit the issue. I have created a new issue to document this bug: #116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants