mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(site): fetch health data only if has permissions (#11062)
This commit is contained in:
@@ -12,7 +12,9 @@ export const DeploymentBanner: FC = () => {
|
|||||||
const deploymentStatsQuery = useQuery(deploymentStats());
|
const deploymentStatsQuery = useQuery(deploymentStats());
|
||||||
const healthQuery = useQuery({
|
const healthQuery = useQuery({
|
||||||
...health(),
|
...health(),
|
||||||
enabled: dashboard.experiments.includes("deployment_health_page"),
|
enabled:
|
||||||
|
dashboard.experiments.includes("deployment_health_page") &&
|
||||||
|
permissions.viewDeploymentValues,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!permissions.viewDeploymentValues || !deploymentStatsQuery.data) {
|
if (!permissions.viewDeploymentValues || !deploymentStatsQuery.data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user