From 31bcff9757de712f65f011f8332d585d52037da1 Mon Sep 17 00:00:00 2001 From: Grzegorz Zdunek Date: Fri, 15 Sep 2023 13:19:35 +0200 Subject: [PATCH] Add a comment explaining `isAgentConfigured` --- .../src/ui/ConnectMyComputer/connectMyComputerContext.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/packages/teleterm/src/ui/ConnectMyComputer/connectMyComputerContext.tsx b/web/packages/teleterm/src/ui/ConnectMyComputer/connectMyComputerContext.tsx index bbd094945815e..d8bcb9a15d22a 100644 --- a/web/packages/teleterm/src/ui/ConnectMyComputer/connectMyComputerContext.tsx +++ b/web/packages/teleterm/src/ui/ConnectMyComputer/connectMyComputerContext.tsx @@ -122,6 +122,8 @@ export const ConnectMyComputerContextProvider: FC<{ mainProcessClient.getRuntimeSettings() ); + // We check `isAgentConfigured`, because the user should always have access to the agent after configuring it. + // https://github.com/gravitational/teleport/blob/master/rfd/0133-connect-my-computer.md#access-to-ui-and-autostart return isFeatureFlagEnabled && (hasPermissions || isAgentConfigured); }, [configService, isAgentConfigured, mainProcessClient, rootCluster]);