Skip to content

Commit 96beaf5

Browse files
feat: [UIE-9852] - IAM: disable input based on permission (#13206)
* feat: [UIE-9852] - IAM: disable input based on permission * Added changeset: IAM: a permission check to the users table input based on view_account permission
1 parent 807c7c1 commit 96beaf5

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@linode/manager": Added
3+
---
4+
5+
IAM: a permission check to the users table input based on view_account permission ([#13206](https://github.com/linode/manager/pull/13206))

packages/manager/src/features/IAM/Users/UsersTable/Users.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ export const UsersLanding = () => {
4141
const [isDeleteDialogOpen, setIsDeleteDialogOpen] = React.useState(false);
4242
const [selectedUsername, setSelectedUsername] = React.useState('');
4343
const theme = useTheme();
44-
const { data: permissions } = usePermissions('account', ['create_user']);
44+
const { data: permissions } = usePermissions('account', [
45+
'create_user',
46+
'view_account',
47+
]);
4548
const pagination = usePaginationV2({
4649
currentRoute: '/iam/users',
4750
initialPage: 1,
@@ -163,6 +166,7 @@ export const UsersLanding = () => {
163166
},
164167
}}
165168
debounceTime={250}
169+
disabled={!permissions?.view_account}
166170
errorText={searchError?.message}
167171
hideLabel
168172
isSearching={isFetching}

0 commit comments

Comments
 (0)