Skip to content

Conversation

@tanushree-akamai
Copy link
Contributor

Description 📝

This PR implements disabling of delete and rebuild actions when a Linode has active locks, with appropriate tooltips and warning messages. When a cannot_delete_with_subresources lock is present, delete operations for Linode subresources (Disks, Configurations, and IP Addresses) are also disabled with appropriate tooltip.

Changes 🔄

  • Delete and rebuild actions is disabled with a tooltip in both Linode action menu and the settings page.
  • Rebuild Modal via Bookmarked URL shows warning message when lock is active with rebuild button disabled.
  • In case cannot_delete_with_subresources lock is applied, in addition to above:
  • Delete Disk option greyed out with tooltip (Storage tab)
  • Delete IP Address option greyed out with tooltip (Network tab)
  • Delete Config option greyed out with tooltip (Configurations tab)

Scope 🚢

Upon production release, changes in this PR will be visible to:

  • All customers
  • Some customers (e.g. in Beta or Limited Availability)
  • No customers / Not applicable

Preview 📷

  1. Delete option greyed out with tooltip in action menu in Linodes list
    Screenshot 2026-02-06 at 6 51 02 PM

  2. Rebuild option greyed out with tooltip in action menu in Linodes list
    Screenshot 2026-02-06 at 6 52 09 PM

  3. Delete option greyed out in action menu in Linode detail screen
    Screenshot 2026-02-06 at 6 54 09 PM

  4. Rebuild option greyed out in action menu Linode detail screen
    Screenshot 2026-02-06 at 6 54 40 PM

  5. Delete option greyed out on Linode settings page
    Screenshot 2026-02-06 at 6 54 58 PM

  6. Rebuild modal through a bookmarked url
    Screenshot 2026-02-06 at 6 56 01 PM

  7. Delete IP Address option greyed out with tooltip in Linode Network tab.
    Screenshot 2026-02-06 at 6 57 13 PM

  8. Delete Disk option greyed out with tooltip in Linode Storage tab.
    Screenshot 2026-02-06 at 6 57 55 PM

  9. Delete Config option greyed out with tooltip in Linode Configurations tab.
    Screenshot 2026-02-06 at 6 58 13 PM

How to test 🧪

Reproduction steps

  • Open DevTools Panel
  • Enable the Resource Lock feature: Find resourceLock -> linodes ->Toggle to true
  • In DevTools Panel, navigate to "MSW" section
  • Enable CRUD mocks: Toggle "Enable MSW" to ON -> Select "CRUD" preset
  • In DevTools Panel, navigate to "Seeds" section -> Set seed counts: Linodes: 10, Resource Locks: 5
  • Navigate to "User Permissions" section
  • Select "Custom User Account Permissions"
  • Click "Edit" to modify permissions
  • Update the permissions array to include lock permissions:
    [ "create_lock", "delete_lock" ]
  • Click on Apply

Verification steps

  • Navigate to /linodes
  • Click on Linode action menu and select Lock
  • Apply Lock
  • Verify above mentioned scenarios

⚠️ This is a temporary workaround for testing only
Since IAM permissions for Resource Locks are not fully implemented yet, you can temporarily bypass the permission checks to validate the Lock/Unlock behavior with real API data.
Comment the permission checks on line 247 in LinodeActionMenu.tsx:
Screenshot 2026-01-30 at 7 03 13 PM

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

@tanushree-akamai tanushree-akamai force-pushed the feature/UIE-9742-disable-required-functionality-on-lock branch from 2385136 to 2cdb4f0 Compare February 6, 2026 14:45

// Lock-related constants
export const LINODE_LOCKED_DELETE_TOOLTIP =
"You don't have permission to delete this linode.";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"You don't have permission to delete this linode.";
"You don't have permission to delete this Linode.";

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in commit 9e4d51b

Comment on lines 57 to 62
<Tooltip
placement="bottom-start"
title={LINODE_LOCKED_DELETE_TOOLTIP}
>
<span>{deleteButton}</span>
</Tooltip>
Copy link
Member

@bnussman-akamai bnussman-akamai Feb 9, 2026

Choose a reason for hiding this comment

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

This is okay but our Button component has a tooltipText prop on it. Would it make sense to leverage that feature here?

https://design.linode.com/?path=/story/foundations-button--disabled-tooltip

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in commit 9e4d51b

Comment on lines 62 to 64
const isLinodeSubResourcesLocked =
!!linode?.locks?.length &&
linode.locks.includes('cannot_delete_with_subresources');
Copy link
Member

Choose a reason for hiding this comment

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

Is the !!linode?.locks?.length part necessary?

We may be able to simplify it a bit:

Suggested change
const isLinodeSubResourcesLocked =
!!linode?.locks?.length &&
linode.locks.includes('cannot_delete_with_subresources');
const isLinodeSubResourcesLocked = linode?.locks?.includes('cannot_delete_with_subresources') ?? false;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in commit 9e4d51b


// Lock-related constants
export const LINODE_LOCKED_DELETE_TOOLTIP =
"You don't have permission to delete this Linode.";
Copy link
Contributor

@grevanak-akamai grevanak-akamai Feb 10, 2026

Choose a reason for hiding this comment

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

This message conveys IAM permission issue rather than just for resource lock. To me, message added for rebuild looks correct and shouldn't it be conveyed in rest of the messages too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had conveyed the same to Karthik. Since this isn’t a high priority right now and the feature won’t be toggled on, he’ll revisit it later. For now we will go with what we have in figma.

Copy link
Contributor

@grevanak-akamai grevanak-akamai Feb 10, 2026

Choose a reason for hiding this comment

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

Similar to this, we need to block deletion of linode interfaces too here. This is mentioned in API doc too

Image

Copy link
Contributor Author

@tanushree-akamai tanushree-akamai Feb 10, 2026

Choose a reason for hiding this comment

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

Good catch! Addressed in a320ced

{isLocked && (
<Notice
spacingBottom={16}
text={LINODE_LOCKED_DELETE_CONFIG_TOOLTIP}
Copy link
Contributor

Choose a reason for hiding this comment

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

This message is for linode config profiles right? We need to have a separate message here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in a320ced

@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🔺 1 failing test on test run #7 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
1 Failing865 Passing11 Skipped37m 56s

Details

Failing Tests
SpecTest
quotas-storage.spec.tsCloud Manager Cypress Tests→Quota workflow tests→Quota storage table » Quotas and quota usages display properly

Troubleshooting

Use this command to re-run the failing tests:

pnpm cy:run -s "cypress/e2e/core/account/quotas-storage.spec.ts"

Copy link
Contributor

@grevanak-akamai grevanak-akamai left a comment

Choose a reason for hiding this comment

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

Changes looks good. Thanks @tanushree-akamai

@grevanak-akamai grevanak-akamai added the Add'tl Approval Needed Waiting on another approval! label Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Add'tl Approval Needed Waiting on another approval! Ready for Review RESPROT-2 Resource Locking

Projects

Status: Review

Development

Successfully merging this pull request may close these issues.

4 participants