Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAK-50970 When you impersonate a instructor and use Enter Student View, when you exit, you should return to the instructor sessions instead of admin session #13287

Merged
merged 3 commits into from
Feb 18, 2025

Conversation

susowrc
Copy link
Contributor

@susowrc susowrc commented Feb 7, 2025

SAK-50970 When you impersonate a instructor and use Enter Student View, when you exit, you should return to the instructor sessions instead of admin session

https://sakaiproject.atlassian.net/browse/SAK-50970

…w, when you exit, you should return to the instructor sessions instead of admin session
@susowrc
Copy link
Contributor Author

susowrc commented Feb 7, 2025

Please @ern and @jesusmmp could you review the changes uploaded?

Copy link
Contributor

@ottenhoff ottenhoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome. I just noticed this yesterday.

@jesusmmp jesusmmp requested a review from ern February 7, 2025 15:26
Copy link
Contributor

@ern ern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please address the thread safety issue

@ern
Copy link
Contributor

ern commented Feb 7, 2025

an interesting question would be why it returns to the admin user?

@ern
Copy link
Contributor

ern commented Feb 7, 2025

so I understand why it goes back to the admin user:

  • the issue here is that the restoreUser, is restoring the user using the original UsageSession which is the admin user
  • so when your impesonating 2x
  • once with BecomeUser and then once with Enter Student View
  • the original UsageSession is always the original (admin) user (edited)
  • before the first impersonation

…View, when you exit, you should return to the instructor sessions instead of admin session
…View, when you exit, you should return to the instructor sessions instead of admin session
@susowrc
Copy link
Contributor Author

susowrc commented Feb 11, 2025

I apply changes as mentioned. @ern, can you please review it?. Thank you.

@jesusmmp jesusmmp requested a review from ern February 12, 2025 07:12
@ern ern merged commit 399acb9 into sakaiproject:master Feb 18, 2025
5 checks passed
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.

3 participants