diff --git a/apps/dokploy/__test__/wss/authorize.test.ts b/apps/dokploy/__test__/wss/authorize.test.ts index cb83d1e1e..45379f684 100644 --- a/apps/dokploy/__test__/wss/authorize.test.ts +++ b/apps/dokploy/__test__/wss/authorize.test.ts @@ -3,11 +3,9 @@ import { beforeEach, describe, expect, it, vi } from "vitest"; // Mock the permission + server helpers the wss authorizer composes. const mockHasPermission = vi.hoisted(() => vi.fn()); const mockFindMember = vi.hoisted(() => vi.fn()); -const mockCheckServiceAccess = vi.hoisted(() => vi.fn()); vi.mock("@dokploy/server/services/permission", () => ({ hasPermission: mockHasPermission, findMemberByUserId: mockFindMember, - checkServiceAccess: mockCheckServiceAccess, })); const mockGetAccessibleServerIds = vi.hoisted(() => vi.fn()); @@ -54,22 +52,6 @@ describe("canAccessDockerOverWss", () => { mockGetAccessibleServerIds.mockResolvedValue(new Set(["srv-1"])); expect(await canAccessDockerOverWss(USER, SESSION, "srv-1")).toBe(true); }); - - it("denies when the container belongs to a service the caller cannot access", async () => { - mockHasPermission.mockResolvedValue(true); - mockCheckServiceAccess.mockRejectedValue(new Error("no access")); - expect(await canAccessDockerOverWss(USER, SESSION, null, "svc-1")).toBe( - false, - ); - }); - - it("allows when the caller has access to the container's service", async () => { - mockHasPermission.mockResolvedValue(true); - mockCheckServiceAccess.mockResolvedValue(undefined); - expect(await canAccessDockerOverWss(USER, SESSION, null, "svc-1")).toBe( - true, - ); - }); }); describe("canAccessTerminalOverWss", () => { diff --git a/apps/dokploy/components/dashboard/compose/general/actions.tsx b/apps/dokploy/components/dashboard/compose/general/actions.tsx index 0ac6d4c68..c2b984b39 100644 --- a/apps/dokploy/components/dashboard/compose/general/actions.tsx +++ b/apps/dokploy/components/dashboard/compose/general/actions.tsx @@ -206,7 +206,6 @@ export const ComposeActions = ({ composeId }: Props) => { appName={data?.appName || ""} serverId={data?.serverId || ""} appType={data?.composeType || "docker-compose"} - serviceId={data?.composeId} >