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

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

Conversation

bnussman-akamai
Copy link
Contributor

@bnussman-akamai bnussman-akamai commented Aug 28, 2024

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 🔧

Target release date 🗓️

9/3/24

Preview 📷

Before After
Screenshot 2024-08-28 at 11 14 54 AM
Screen.Recording.2024-08-28.at.11.15.40.AM.mov
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 bnussman-akamai added the Bug Fixes for regressions or bugs label Aug 28, 2024
@bnussman-akamai bnussman-akamai self-assigned this Aug 28, 2024
@bnussman-akamai bnussman-akamai requested a review from a team as a code owner August 28, 2024 15:25
@bnussman-akamai bnussman-akamai requested review from hana-linode and abailly-akamai and removed request for a team August 28, 2024 15:25
@@ -46,7 +49,7 @@ export const getLinodeCreateResolver = (
getRegionCountryGroup(selectedRegion)
);

if (hasSelectedAnEURegion) {
if (hasSelectedAnEURegion && !context?.profile?.restricted) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the fix 🔨

We only check account agreements if the user is not restricted

Copy link

github-actions bot commented Aug 28, 2024

Coverage Report:
Base Coverage: 82.73%
Current Coverage: 82.73%

Copy link
Contributor

@abailly-akamai abailly-akamai left a comment

Choose a reason for hiding this comment

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

Thx for the fix!

@hana-linode hana-linode added the Approved Multiple approvals and ready to merge! label Aug 28, 2024
@bnussman-akamai bnussman-akamai merged commit fb93fa5 into linode:develop Aug 28, 2024
19 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! Bug Fixes for regressions or bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants