From 7a6e1dbc1b513380884c348fffdeef38877e7980 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sat, 29 Mar 2025 15:04:33 -0600 Subject: [PATCH] Refactor SecurityAudit component: remove unused root login security check and related UI elements to streamline the code and improve readability. --- .../settings/servers/security-audit.tsx | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/apps/dokploy/components/dashboard/settings/servers/security-audit.tsx b/apps/dokploy/components/dashboard/settings/servers/security-audit.tsx index 98f56d93f..851db40fb 100644 --- a/apps/dokploy/components/dashboard/settings/servers/security-audit.tsx +++ b/apps/dokploy/components/dashboard/settings/servers/security-audit.tsx @@ -25,21 +25,6 @@ export const SecurityAudit = ({ serverId }: Props) => { enabled: !!serverId, }, ); - const _utils = api.useUtils(); - - // Helper function to check if root login is securely configured - const isRootLoginSecure = () => { - if (!data?.ssh?.permitRootLogin) return false; - - // These are secure options for PermitRootLogin - const secureOptions = [ - "no", - "prohibit-password", - "without-password", - "forced-commands-only", - ]; - return secureOptions.includes(data.ssh.permitRootLogin); - }; return ( @@ -162,15 +147,6 @@ export const SecurityAudit = ({ serverId }: Props) => { : "Enabled (Password Authentication should be disabled)" } /> -