Skip to content

Commit 6fdf11f

Browse files
fix: [UIE-9174] - Restricted user with read-write billing access, unable to access billing (linode#12861)
* fix account/billing * fix account fetching for restricted users * Revert "fix account fetching for restricted users" This reverts commit 3185622. * keep account query enabled * make the same change for account settings * add changelog entry --------- Co-authored-by: Banks Nussman <bnussman@akamai.com>
1 parent 350e09e commit 6fdf11f

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

packages/manager/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
1010
### Fixed:
1111

1212
- "Something went wrong" error on firewall create ([#12859](https://github.com/linode/manager/pull/12859))
13+
- Restricted user with account access unable to access billing page on new session ([#12861](https://github.com/linode/manager/pull/12861))
1314

1415
## [2025-09-09] - v1.150.0
1516

packages/queries/src/account/account.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,12 @@ import type {
1717
Token,
1818
} from '@linode/api-v4';
1919

20-
export const useAccount = () => {
21-
const { data: profile } = useProfile();
22-
20+
export const useAccount = (enabled: boolean = true) => {
2321
return useQuery<Account, APIError[]>({
2422
...accountQueries.account,
2523
...queryPresets.oneTimeFetch,
2624
...queryPresets.noRetry,
27-
enabled: !profile?.restricted,
25+
enabled,
2826
});
2927
};
3028

packages/queries/src/account/settings.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,17 @@ import { updateAccountSettings } from '@linode/api-v4/lib/account';
22
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
33

44
import { queryPresets } from '../base';
5-
import { useProfile } from '../profile';
65
import { accountQueries } from './queries';
76

87
import type { AccountSettings } from '@linode/api-v4/lib/account';
98
import type { APIError } from '@linode/api-v4/lib/types';
109
import type { QueryClient } from '@tanstack/react-query';
1110

1211
export const useAccountSettings = () => {
13-
const { data: profile } = useProfile();
14-
1512
return useQuery<AccountSettings, APIError[]>({
1613
...accountQueries.settings,
1714
...queryPresets.oneTimeFetch,
1815
...queryPresets.noRetry,
19-
enabled: !profile?.restricted,
2016
});
2117
};
2218

0 commit comments

Comments
 (0)