fix(site): fetch health data only if has permissions (#11062)
This commit is contained in:
1 parent
43488b44ce
commit
2bc11d2e63
1 file changed
+3
-1
@@ -12,7 +12,9 @@ export const DeploymentBanner: FC = () => {
|
||||
const deploymentStatsQuery = useQuery(deploymentStats());
|
||||
const healthQuery = useQuery({
|
||||
...health(),
|
||||
enabled: dashboard.experiments.includes("deployment_health_page"),
|
||||
enabled:
|
||||
dashboard.experiments.includes("deployment_health_page") &&
|
||||
permissions.viewDeploymentValues,
|
||||
});
|
||||
|
||||
if (!permissions.viewDeploymentValues || !deploymentStatsQuery.data) {
|
||||
|
||||
Reference in new issue
Block a user