Skip to content

Conversation

@mpolotsk-akamai
Copy link
Contributor

@mpolotsk-akamai mpolotsk-akamai commented Oct 15, 2025

Description 📝

This PR adds the Default Roles table for Default Access.

Changes 🔄

List any change(s) relevant to the reviewer.

  • Update AssignedRolesTable
  • Update Change/Unassign Role drawers

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

Target release date 🗓️

11/04

Preview 📷

Screenshot 2025-10-23 at 11 19 34 AM
Screenshot 2025-10-23 at 11 20 02 AM
Screenshot 2025-10-23 at 11 21 02 AM

How to test 🧪

Prerequisites

(How to setup test environment)

  • IAM parent/child DevCloud account (IAM Delegation (Parent/Child) flag should be enabled)
  • use MSW CRUD mode

Verification steps

(How to verify changes)

  • go to /iam/roles/
  • click 'View default roles' button
  • go to 'Default Roles' tab
  • verify that table with default roles is visible
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

@mpolotsk-akamai mpolotsk-akamai self-assigned this Oct 15, 2025
@mpolotsk-akamai mpolotsk-akamai added the IAM Delegation Implementing the new Parent/Child delegation UI label Oct 21, 2025
@mpolotsk-akamai mpolotsk-akamai force-pushed the UIE-9357-default-roles-table branch from 1bb52a9 to f065ad2 Compare October 21, 2025 13:25
@mpolotsk-akamai mpolotsk-akamai force-pushed the UIE-9357-default-roles-table branch from f065ad2 to 87db233 Compare October 22, 2025 13:48
@mpolotsk-akamai mpolotsk-akamai marked this pull request as ready for review October 23, 2025 09:23
@mpolotsk-akamai mpolotsk-akamai requested a review from a team as a code owner October 23, 2025 09:25
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.

UI looks good! and logic is mostly good and in sync with the entities tab.

Approving pending some cleanup and code quality improvements.

onClose={() => setIsUpdateEntitiesDrawerOpen(false)}
open={isUpdateEntitiesDrawerOpen}
role={selectedRole}
username={username}
Copy link
Contributor

Choose a reason for hiding this comment

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

same comment as above. This can all be cleaned up since the useIsDefaultDelegationRolesForChildAccount is used in all those modals

iamQueries.user(username)._ctx.roles.queryKey,
role,
);
if (username && enabled) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@abailly-akamai , could you please check if that's what you mean? I haven't found anything similar to this in CM (might've missed something)

Copy link
Contributor

Choose a reason for hiding this comment

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

This works but I would simplify: (sorry the enabled suggestion was not appropriate/needed)

conditional queries/mutations are tricky to handle. usually we tend to render different components but I think this should suffice.

Maybe i am overthinking this and username ?? '' is fine but either way the challenge is to surface a proper error if that happens. Usually i try to prevent sending a mutation if we already know the payload isn't right. sending '' is just getting around the types which isn't ideal

export const useUserRolesMutation = (username: string | undefined) => {
  const queryClient = useQueryClient();

  return useMutation<IamUserRoles, APIError[], IamUserRoles>({
    mutationFn: (data) => {
      if (!username) {
        throw new Error('Username is required');
      }
      return updateUserRoles(username, data);
    },
    onSuccess: (role) => {
      if (username) {
        queryClient.setQueryData<IamUserRoles>(
          iamQueries.user(username)._ctx.roles.queryKey,
          role,
        );
      }
    },
  });
};

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated, thanks!

@mpolotsk-akamai mpolotsk-akamai force-pushed the UIE-9357-default-roles-table branch from 34e926d to d599b68 Compare October 29, 2025 11:38
@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🔺 3 failing tests on test run #12 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
3 Failing844 Passing12 Skipped41m 33s

Details

Failing Tests
SpecTest
clone-linode.spec.tsCloud Manager Cypress Tests→clone linode » can clone a Linode from Linode details page
create-firewall.spec.tsCloud Manager Cypress Tests→create firewall » "before all" hook for "creates a firewall without a linode"
timerange-verification.spec.tsCloud Manager Cypress Tests→Integration tests for verifying Cloudpulse custom and preset configurations » should implement and validate custom date/time picker for a specific date and time range

Troubleshooting

Use this command to re-run the failing tests:

pnpm cy:run -s "cypress/e2e/core/linodes/clone-linode.spec.ts,cypress/e2e/core/firewalls/create-firewall.spec.ts,cypress/e2e/core/cloudpulse/timerange-verification.spec.ts"

@github-project-automation github-project-automation bot moved this from Review to Approved in Cloud Manager Oct 29, 2025
@mpolotsk-akamai mpolotsk-akamai merged commit 767597e into linode:develop Oct 29, 2025
34 of 35 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Merged in Cloud Manager Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

IAM Delegation Implementing the new Parent/Child delegation UI

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

4 participants