Skip to content

Conversation

@corya-akamai
Copy link
Contributor

@corya-akamai corya-akamai commented Jul 23, 2025

Description 📝

Modified the query parameter to allow varying use cases. Return any errors from the API along with isLoading, isError values.

Changes 🔄

List any change(s) relevant to the reviewer.

  • Modified the query parameter to allow varying use cases
  • Return any errors from the API along with isLoading, isError values.

Target release date 🗓️

8/12

Preview 📷

Restricted non-beta (Grants)
restricted-grants
Restricted beta (Permissions)
restricted-permissions
Unrestricted non-beta (Grants)
unrestricted-grants
Unrestricted beta (Permissions)
unrestricted-permissions

How to test 🧪

Prerequisites

  • devcloud IAM account unrestricted user
  • devcloud IAM account restricted user

Reproduction steps

Verification steps

  • Unrestricted user has access to all lindoes non-beta
  • Unrestricted user has access to all lindoes beta
  • Rrestricted user has access to a limited set of lindoes non-beta
  • Rrestricted user has access to a limited set of lindoes beta
Author Checklists

As an Author, to speed up the review process, I 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


  • I have read and considered all applicable items listed above.

As an Author, before moving this PR from Draft to Open, I confirmed ✅

  • All tests and CI checks are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

@corya-akamai corya-akamai requested a review from a team as a code owner July 23, 2025 14:06
@corya-akamai corya-akamai requested review from coliu-akamai and dwiley-akamai and removed request for a team July 23, 2025 14:06
@corya-akamai corya-akamai added 🚨 Urgent Linodes Dealing with the Linodes section of the app IAM (Identity & Access Management) Firewalls Related to Firewalls labels Jul 23, 2025
Copy link
Contributor

@coliu-akamai coliu-akamai left a comment

Choose a reason for hiding this comment

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

Just wanted to double check testing setup to make sure I'm understanding everything correctly: I created a new user for myself on the iam account with limited permissions.

  • should I be using IAM and the users & roles tab to update my limited account's viewable entities?
  • Can I also use the grants model on this account, or should I have a separate, non-iam related restricted account to test on?

@corya-akamai
Copy link
Contributor Author

corya-akamai commented Jul 23, 2025

Just wanted to double check testing setup to make sure I'm understanding everything correctly: I created a new user for myself on the iam account with limited permissions.

  • should I be using IAM and the users & roles tab to update my limited account's viewable entities?
  • Can I also use the grants model on this account, or should I have a separate, non-iam related restricted account to test on?

@coliu-akamai , Yes you can use the grants model on the same IAM account. Just turn the IAM flag off.

@linode linode deleted a comment from linode-gh-bot Jul 23, 2025
@kwojtowiakamai
Copy link

kwojtowiakamai commented Jul 28, 2025

In both the Create Firewall and Restore Backup drawers:
✅ Dropdown options are correctly displayed based on the permissions/grants for both IAM and non-IAM users.
✅ Loading state works correctly.
✅ Error state works correctly.

@kwojtowiakamai
Copy link

I found one edge case, but I don't know if this scenario is possible without using devtools. The page shows TypeError: Cannot read properties of undefined (reading 'update_linode')

Steps to reproduce:

  • The user has only the account_linode_admin role assigned.
  • Log in as the user to CM and go to http://localhost:3000/linodes/{linode_id}/backup.
  • Disable the Identity and Access Beta feature flag in the devtools.
  • Click the Restore to Existing Linode option for the backup entity.
image
Screen.Recording.2025-07-28.at.12.45.18.PM2.mov

Copy link
Contributor

@dwiley-akamai dwiley-akamai left a comment

Choose a reason for hiding this comment

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

Observed the described options for unrestricted & restricted users w/ beta on and off ✅
Code review ✅

Could consider adding some test assertions in RestoreToLinodeDrawer.test.tsx to cover the different scenarios and see if the expected options are displayed

"@linode/manager": Upcoming Features
---

Modified the query parameter to allow varying use cases. Return any errors from the API along with isLoading, isError values. ([#12560](https://github.com/linode/manager/pull/12560))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Modified the query parameter to allow varying use cases. Return any errors from the API along with isLoading, isError values. ([#12560](https://github.com/linode/manager/pull/12560))
IAM RBAC: Modified query parameter to allow varying use cases, return API errors, and return isLoading and isError values ([#12560](https://github.com/linode/manager/pull/12560))

Copy link
Contributor

@coliu-akamai coliu-akamai left a comment

Choose a reason for hiding this comment

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

ahh right 🤦‍♀️ thanks @corya-akamai!

✅ confirmed the four scenarios

@github-project-automation github-project-automation bot moved this from Review to Approved in Cloud Manager Jul 29, 2025
@coliu-akamai coliu-akamai added the Approved Multiple approvals and ready to merge! label Jul 29, 2025
Conal Ryan added 3 commits July 30, 2025 08:20
@corya-akamai corya-akamai force-pushed the UIE-8999-useQueryWithPermissions branch from 54a6dfb to adc698f Compare July 30, 2025 12:21
@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🔺 3 failing tests on test run #6 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
3 Failing698 Passing4 Skipped134m 20s

Details

Failing Tests
SpecTest
lke-create.spec.tsCloud Manager Cypress Tests→LKE Cluster Creation with ACL→with LKE IPACL account capability » LKE Cluster Creation with ACL→with LKE IPACL account capability
lke-create.spec.tsCloud Manager Cypress Tests→LKE Cluster Creation with ACL→with LKE IPACL account capability » LKE Cluster Creation with ACL→with LKE IPACL account capability
lke-create.spec.tsCloud Manager Cypress Tests→LKE Cluster Creation with ACL→with LKE IPACL account capability » LKE Cluster Creation with ACL→with LKE IPACL account capability

Troubleshooting

Use this command to re-run the failing tests:

pnpm cy:run -s "cypress/e2e/core/kubernetes/lke-create.spec.ts"

@corya-akamai
Copy link
Contributor Author

Cloud Manager UI test results

🔺 3 failing tests on test run #6 ↗︎

❌ Failing ✅ Passing ↪️ Skipped 🕐 Duration
3 Failing 698 Passing 4 Skipped 134m 20s

Details

Failing Tests
Spec Test
lke-create.spec.ts Cloud Manager Cypress Tests→LKE Cluster Creation with ACL→with LKE IPACL account capability » LKE Cluster Creation with ACL→with LKE IPACL account capability
lke-create.spec.ts Cloud Manager Cypress Tests→LKE Cluster Creation with ACL→with LKE IPACL account capability » LKE Cluster Creation with ACL→with LKE IPACL account capability
lke-create.spec.ts Cloud Manager Cypress Tests→LKE Cluster Creation with ACL→with LKE IPACL account capability » LKE Cluster Creation with ACL→with LKE IPACL account capability

Troubleshooting

Use this command to re-run the failing tests:

pnpm cy:run -s "cypress/e2e/core/kubernetes/lke-create.spec.ts"

#12561 (comment)

@corya-akamai corya-akamai merged commit 9983af1 into linode:develop Jul 30, 2025
34 of 35 checks passed
@corya-akamai corya-akamai deleted the UIE-8999-useQueryWithPermissions branch July 30, 2025 17:59
@github-project-automation github-project-automation bot moved this from Approved to Merged in Cloud Manager Jul 30, 2025
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! Firewalls Related to Firewalls IAM (Identity & Access Management) Linodes Dealing with the Linodes section of the app

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants