mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-30 15:15:24 +00:00
feat: rebuild workspaces as the reference plugin
This commit is contained in:
1 parent
d774df8b41
commit
f217d8db89
79 files changed
+32995
-2184
No files matched your search
@@ -166,6 +166,16 @@ describe("service registry", () => {
|
||||
expect(audits[0].success).toBe(true);
|
||||
});
|
||||
|
||||
it("runs the provider as the user the permission was checked for", async () => {
|
||||
const { getActor } = await import("../../plugins/actor.js");
|
||||
register({
|
||||
implementation: { hello: async () => getActor() ?? "nobody" },
|
||||
});
|
||||
const { handle } = handleFor(true, "user-7");
|
||||
|
||||
await expect(handle.hello("x")).resolves.toBe("user-7");
|
||||
});
|
||||
|
||||
it("denies without the permission and never reaches the provider", async () => {
|
||||
const hello = vi.fn(async () => "should not run");
|
||||
register({ implementation: { hello } });
|
||||
|
||||
Reference in new issue
Block a user