chore(monitoring): address review comments

This commit is contained in:
Yash Kumar
2026-10-22 21:27:11 +05:30
parent c5e364dbcb
commit 8cac2d849d
2 changed files with 1 additions and 4 deletions
+1 -1
View File
@@ -192,7 +192,7 @@ const MENU: Menu = {
title: "Monitoring",
url: "/dashboard/monitoring",
icon: BarChartHorizontalBigIcon,
// Host stats also need docker.read, which the stats socket requires
// Only enabled in non-cloud environments (product decision) and if user has monitoring.read and docker.read
isEnabled: ({ isCloud, permissions }) =>
!isCloud &&
!!permissions?.monitoring.read &&
@@ -113,9 +113,6 @@ export async function getServerSideProps(
user: { id: user.id },
session: { activeOrganizationId: session?.activeOrganizationId || "" },
};
// Host stats come from the docker stats socket, which requires docker.read.
// Checked separately because a member's "Access to Docker" is a legacy
// override that only applies when every requested resource has one.
const canView =
(await hasPermission(permissionCtx, { monitoring: ["read"] })) &&
(await hasPermission(permissionCtx, { docker: ["read"] }));