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

feat: [UIE-8138, UIE-8139] - IAM RBAC: add new assigned roles table component part 2 #11762

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

aaleksee-akamai
Copy link
Contributor

IAM RBAC - update assigned roles and entities table components.

Description 📝

Highlight the Pull Request's context and intentions.

Changes 🔄

List any change(s) relevant to the reviewer.

  • update styles for Permissions component
  • add Permissions component to Assigned roles table
  • update styles for Assigned roles table component
  • update styles for Assigned entities table component
  • add new component for assigned entities
  • add logic to action menu item View entities
  • move the func from Assigned roles table to utilities and add test for it

Target release date 🗓️

dev

Preview 📷

Include a screenshot or screen recording of the change.

🔒 Use the Mask Sensitive Data setting for security.

💡 Use <video src="" /> tag when including recordings in table.

Before After
image image
image image
image image
image image
image image

How to test 🧪

Prerequisites

  • Ensure the Identity and Access Beta flag is enabled in dev tools
  • Ensure the MSW is enabled in dev tools
  • Click on the any username in the users table and go to the tab Assigned Roles or click on the user's menu View User Roles
  • ...

Verification steps

(How to verify changes)

  • Confirm tables renders
  • Confirm the assigned entities component renders
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 unit tests are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

@aaleksee-akamai aaleksee-akamai requested a review from a team as a code owner February 28, 2025 10:49
@aaleksee-akamai aaleksee-akamai requested review from coliu-akamai and bill-akamai and removed request for a team February 28, 2025 10:49
@aaleksee-akamai aaleksee-akamai self-assigned this Feb 28, 2025
@aaleksee-akamai aaleksee-akamai force-pushed the UIE-8138-iam-rbac-assigned-roles-table-part-2 branch from dff0da4 to 9b682f4 Compare February 28, 2025 11:02
Copy link

github-actions bot commented Feb 28, 2025

Coverage Report:
Base Coverage: 80.17%
Current Coverage: 80.18%

* improve-banner-spacing

* update test

* add changeset

---------

Co-authored-by: Banks Nussman <[email protected]>
@aaleksee-akamai aaleksee-akamai force-pushed the UIE-8138-iam-rbac-assigned-roles-table-part-2 branch from 9b682f4 to 569c5ee Compare February 28, 2025 11:47
* Group account_access and resource_access roles of the user
*
*/
const combineRoles = (data: IamUserPermissions): CombinedRoles[] => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved all func to utilities.ts

const getResourceTypes = (data: RoleMap[]): EntitiesType[] =>
mapEntityTypes(data, ' Roles');

export const StyledTypography = styled(Typography, {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not needed

@@ -7,13 +7,6 @@ export const sxTooltipIcon = {
padding: 0,
};

export const StyledTypography = styled(Typography, {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not needed

@@ -46,23 +42,6 @@ export const StyledClampedContent = styled('div', {
export const StyledBox = styled(Box, {
label: 'StyledBox',
})(({ theme }) => ({
backgroundColor:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not needed

}));

export const StyledSpan = styled(Typography, { label: 'StyledSpan' })(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not needed


const itemRefs = React.useRef<(HTMLSpanElement | null)[]>([]);

const calculateHiddenItems = React.useCallback(() => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

move that func to utilities.ts, it's used by 2 components (Permissions and Assigned Entities) now

@@ -2,7 +2,7 @@ import { Autocomplete, Typography } from '@linode/ui';
import { capitalize } from '@linode/utilities';
import { Grid } from '@mui/material';
import React from 'react';
import { useParams } from 'react-router-dom';
import { useLocation, useParams } from 'react-router-dom';

Copy link
Contributor Author

Choose a reason for hiding this comment

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

move from Shared folder cause it's not shared, i'll do the same for AssignedRolesTable in the next PR

@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🔺 1 failing test on test run #3 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
1 Failing529 Passing3 Skipped99m 22s

Details

Failing Tests
SpecTest
timerange-verification.spec.tsIntegration tests for verifying Cloudpulse custom and preset configurations » Implement and validate the functionality of the custom date and time picker for selecting a specific date and time range

Troubleshooting

Use this command to re-run the failing tests:

pnpm cy:run -s "cypress/e2e/core/cloudpulse/timerange-verification.spec.ts"

@cpathipa cpathipa requested review from cpathipa and removed request for bill-akamai February 28, 2025 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants