Skip to content

Commit 2bc11d2

Browse files
fix(site): fetch health data only if has permissions (#11062)
1 parent 43488b4 commit 2bc11d2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

site/src/components/Dashboard/DeploymentBanner/DeploymentBanner.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ export const DeploymentBanner: FC = () => {
1212
const deploymentStatsQuery = useQuery(deploymentStats());
1313
const healthQuery = useQuery({
1414
...health(),
15-
enabled: dashboard.experiments.includes("deployment_health_page"),
15+
enabled:
16+
dashboard.experiments.includes("deployment_health_page") &&
17+
permissions.viewDeploymentValues,
1618
});
1719

1820
if (!permissions.viewDeploymentValues || !deploymentStatsQuery.data) {

0 commit comments

Comments
 (0)