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

upcoming: [M3-7814, M3-7819] - Fix Account Switching #10234

Merged
merged 6 commits into from
Feb 27, 2024

Conversation

jaalah-akamai
Copy link
Contributor

Description πŸ“

There were a few issues with proxy tokens and loading child users for proxy accounts.

Changes πŸ”„

  • The prefix Bearer was missing from the proxy token sending us back to login upon switching.
  • We were always passing the current token to ChildAccountList which prevented us from fetching child accounts while in a proxy account. This token needs to be the parent token when logged in as a proxy.

Target release date πŸ—“οΈ

03/04/2024

Preview πŸ“·

parent-child.mp4

How to test πŸ§ͺ

Prerequisites

(How to setup test environment)

  • You need to create parent & child accounts (see me if you want to)

Verification steps

  • Log into dev using parent account creds
  • Open user menu and click "Switch Accounts"
  • Observe children load
  • Select any child accounts and observe page refresh
  • You should now be in proxy account
  • Open user menu and click "Switch Accounts"
  • Observe children load
  • Click "switch back to your account" and observe you should now be back in the parent account.

As an Author I have considered πŸ€”

Check all that apply

  • πŸ‘€ Doing a self review
  • ❔ Our contribution guidelines
  • 🀏 Splitting feature into small PRs
  • βž• Adding a changeset
  • πŸ§ͺ Providing/Improving test coverage
  • πŸ” Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • πŸ‘£ Providing comprehensive reproduction steps
  • πŸ“‘ Providing or updating our documentation
  • πŸ•› Scheduling a pair reviewing session
  • πŸ“± Providing mobile support
  • β™Ώ Providing accessibility support

// We don't need to worry about this if we're a proxy user.
if (!isProxyUser) {
const parentToken = {
const parentToken: Token = {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

More type safety

@jaalah-akamai jaalah-akamai marked this pull request as ready for review February 27, 2024 21:16
@jaalah-akamai jaalah-akamai requested a review from a team as a code owner February 27, 2024 21:16
@jaalah-akamai jaalah-akamai requested review from mjac0bs and abailly-akamai and removed request for a team February 27, 2024 21:16
@mjac0bs mjac0bs changed the title upcoming: [M3-7814] - Fix Account Switching upcoming: [M3-7814, M3-7819] - Fix Account Switching Feb 27, 2024
Copy link
Contributor

@mjac0bs mjac0bs left a comment

Choose a reason for hiding this comment

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

  • From a parent account, I can switch to a proxy account.
  • From a proxy account, I can switch to another proxy account.
  • From a proxy account, I can switch back to a parent account.

Copy link

github-actions bot commented Feb 27, 2024

Coverage Report: βœ…
Base Coverage: 81.34%
Current Coverage: 81.34%

jaalah-akamai and others added 2 commits February 27, 2024 17:01
Co-authored-by: Mariah Jacobs <114685994+mjac0bs@users.noreply.github.com>
Co-authored-by: Mariah Jacobs <114685994+mjac0bs@users.noreply.github.com>
@jaalah-akamai jaalah-akamai requested a review from a team as a code owner February 27, 2024 22:05
@jaalah-akamai jaalah-akamai requested review from cliu-akamai and removed request for a team February 27, 2024 22:05
Copy link
Contributor

@jdamore-linode jdamore-linode left a comment

Choose a reason for hiding this comment

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

πŸŽ‰ Awesome! Confirmed that the tests now pass without the workarounds (and pushed a commit with those workarounds removed). Feels like a big milestone!

@mjac0bs mjac0bs added Approved Multiple approvals and ready to merge! and removed Ready for Review labels Feb 27, 2024
@jaalah-akamai jaalah-akamai merged commit e255d5b into linode:develop Feb 27, 2024
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Multiple approvals and ready to merge! Parent / Child Account
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants