fix(security): scope managed path opening
This commit is contained in:
1 parent
bde35c3518
commit
66e24b1060
9 files changed
+66
-30
No files matched your search
@@ -33,6 +33,7 @@ function registerOpenWorkProductHandler(url: string) {
|
||||
},
|
||||
settings: {
|
||||
canOpenPath: vi.fn(() => true),
|
||||
getCurrentCompanyId: vi.fn(() => companyId),
|
||||
},
|
||||
},
|
||||
projection: {
|
||||
|
||||
@@ -105,7 +105,9 @@ describe("preload forwarders", () => {
|
||||
expect(objectArg).toBeDefined();
|
||||
|
||||
expect(mapPreloadInvokeArgs(noArgs!.payload, [])).toEqual([]);
|
||||
expect(mapPreloadInvokeArgs(singleArg!.payload, ["/tmp/output"])).toEqual(["/tmp/output"]);
|
||||
expect(mapPreloadInvokeArgs(singleArg!.payload, [{ companyId: "2f88b7d1-dafb-42f1-ac75-34fc2de3b0f4", path: "/tmp/output" }])).toEqual([
|
||||
{ companyId: "2f88b7d1-dafb-42f1-ac75-34fc2de3b0f4", path: "/tmp/output" },
|
||||
]);
|
||||
expect(mapPreloadInvokeArgs(objectArg!.payload, ["company-1", "/skills/local"])).toEqual([
|
||||
{ companyId: "company-1", source: "/skills/local" },
|
||||
]);
|
||||
|
||||
Reference in new issue
Block a user