Skip to content

Commit 8aa53e2

Browse files
small changes
1 parent 5642ed8 commit 8aa53e2

3 files changed

Lines changed: 16 additions & 13 deletions

File tree

packages/manager/src/features/IAM/Roles/RolesTable/RolesTable.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,17 +117,15 @@ export const RolesTable = ({ roles }: Props) => {
117117
container
118118
direction="row"
119119
spacing={2}
120-
sx={() => ({
121-
justifyContent: 'space-between',
122-
})}
120+
sx={{ justifyContent: 'space-between' }}
123121
>
124122
<Grid
125123
container
126124
direction="row"
127-
sx={() => ({
125+
sx={{
128126
alignItems: 'center',
129127
justifyContent: 'flex-start',
130-
})}
128+
}}
131129
>
132130
<DebouncedSearchTextField
133131
clearable

packages/manager/src/features/IAM/Shared/constants.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,11 @@ export const NO_ASSIGNED_ENTITIES_TEXT = `The user doesn't have any entities ass
1111
// TODO: update the link when it's ready - UIE-8534
1212
export const IAM_DOCS_LINK =
1313
'https://www.linode.com/docs/platform/identity-access-management/';
14+
15+
export const PAID_ENTITY_TYPES = [
16+
'database',
17+
'linode',
18+
'nodebalancer',
19+
'volume',
20+
'image',
21+
];

packages/manager/src/features/IAM/Shared/utilities.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { capitalize, capitalizeAllWords } from '@linode/utilities';
22

3+
import { PAID_ENTITY_TYPES } from './constants';
4+
35
import type {
46
AccountAccessRole,
57
AccountEntity,
@@ -600,14 +602,9 @@ export const getFacadeRoleDescription = (
600602
role: ExtendedRole | ExtendedRoleMap
601603
): string => {
602604
if (role.access === 'account_access') {
603-
const paidEntity = [
604-
'database',
605-
'linode',
606-
'nodebalancer',
607-
'volume',
608-
'image',
609-
];
610-
const dollarSign = paidEntity.includes(role.entity_type) ? ' ($)' : '';
605+
const dollarSign = PAID_ENTITY_TYPES.includes(role.entity_type)
606+
? ' ($)'
607+
: '';
611608

612609
return `This role grants the same access as the legacy "Can add ${getFormattedEntityType(role.entity_type)}s to this account${dollarSign}" global permissions.`;
613610
}

0 commit comments

Comments
 (0)