manager icon indicating copy to clipboard operation
manager copied to clipboard

fix: [M3-8500] - Restricted users without account access unable to create Linodes on Linode Create v2

Open bnussman-akamai opened this issue 1 year ago โ€ข 1 comments

Description ๐Ÿ“

  • Updates Linode Create v2 to be in parity with Linode Create v1 when it comes to a restricted user creating a Linode in an EU region

The Bug ๐Ÿ›

  • On Linode Create v2, if a user with add_linodes access, but with no account/billing permissions tried to create a LInode, they would see an infinite loading spinner. This is because Cloud Manager was trying to GET /v4/account/agreemeents, but failed to because the endpoint will 403 for this restricted user.

The Fix ๐Ÿ”ง

  • Allow restricted users with add_linodes access but with no account/billing permissions to create Linodes regardless of the account's agreements.
  • This seems questionable, but this is what Linode Create v1 intentionally did. See https://github.com/linode/manager/pull/7901

Target release date ๐Ÿ—“๏ธ

9/3/24

Preview ๐Ÿ“ท

Before After
Screenshot 2024-08-28 at 11 14 54โ€ฏAM
User would see an infinite loading spinner User can create a Linode

How to test ๐Ÿงช

Prerequisites

  • Create a restricted user on your account with the following permissions
    • add_linodes: true (Can add Linodes to this account in the UI)
    • account_access: null (No billing access in the UI)

Reproduction steps

  • Login as the restricted user
  • Try to create a LInode in an EU region
  • Observe an infinite loading spinner when you click "Create Linode" button

Verification steps

  • Repeat the "Reproduction steps" with this PR checked out
  • Rather than seeing an infinite loading spinner, you should be able to successfully create a Linode in an EU region

As an Author I have considered ๐Ÿค”

  • [ ] ๐Ÿ‘€ 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

bnussman-akamai avatar Aug 28 '24 15:08 bnussman-akamai

Coverage Report: โœ…
Base Coverage: 82.73%
Current Coverage: 82.73%

github-actions[bot] avatar Aug 28 '24 15:08 github-actions[bot]