@@ -4,6 +4,7 @@ import { useSnackbar } from 'notistack';
44import * as React from 'react' ;
55
66import { TagCell } from 'src/components/TagCell/TagCell' ;
7+ import { useRestrictedGlobalGrantCheck } from 'src/hooks/useRestrictedGlobalGrantCheck' ;
78import { useLinodeUpdateMutation } from 'src/queries/linodes/linodes' ;
89import { useProfile } from 'src/queries/profile/profile' ;
910import { getAPIErrorOrDefault } from 'src/utilities/errorUtils' ;
@@ -16,8 +17,8 @@ import {
1617 sxLastListItem ,
1718 sxListItemFirstChild ,
1819} from './LinodeEntityDetail.styles' ;
19- import { LinodeHandlers } from './LinodesLanding/LinodesLanding' ;
2020
21+ import type { LinodeHandlers } from './LinodesLanding/LinodesLanding' ;
2122import type { Linode } from '@linode/api-v4/lib/linodes/types' ;
2223import type { TypographyProps } from 'src/components/Typography' ;
2324
@@ -59,6 +60,11 @@ export const LinodeEntityDetailFooter = React.memo((props: FooterProps) => {
5960 openTagDrawer,
6061 } = props ;
6162
63+ const isReadOnlyAccountAccess = useRestrictedGlobalGrantCheck ( {
64+ globalGrantType : 'account_access' ,
65+ permittedGrantLevel : 'read_write' ,
66+ } ) ;
67+
6268 const { mutateAsync : updateLinode } = useLinodeUpdateMutation ( linodeId ) ;
6369
6470 const { enqueueSnackbar } = useSnackbar ( ) ;
@@ -157,7 +163,7 @@ export const LinodeEntityDetailFooter = React.memo((props: FooterProps) => {
157163 sx = { {
158164 width : '100%' ,
159165 } }
160- disabled = { isLinodesGrantReadOnly }
166+ disabled = { isLinodesGrantReadOnly || isReadOnlyAccountAccess }
161167 listAllTags = { openTagDrawer }
162168 tags = { linodeTags }
163169 updateTags = { updateTags }
0 commit comments