mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 14:45:24 +00:00
feat: harden plugin api for separate repos, signed updates and generic external login
This commit is contained in:
1 parent
fb9c168b6b
commit
80944301dd
310 files changed
+6577
-4927
No files matched your search
@@ -190,10 +190,17 @@ describe("ctx.db capability", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("hands back read-only refs to the core tables a plugin may join", async () => {
|
||||
it("refuses core refs with only db:own", async () => {
|
||||
grants.set("demo", ["db:own"]);
|
||||
const { ctx } = contextFor("demo", ["db:own"]);
|
||||
|
||||
await expect(ctx.db.refs()).rejects.toThrow(/db:core-refs/);
|
||||
});
|
||||
|
||||
it("hands back refs to the core tables a plugin may join", async () => {
|
||||
grants.set("demo", ["db:core-refs"]);
|
||||
const { ctx } = contextFor("demo", ["db:core-refs"]);
|
||||
|
||||
const refs = (await ctx.db.refs()) as Record<string, unknown>;
|
||||
|
||||
expect(Object.keys(refs).sort()).toEqual([
|
||||
|
||||
Reference in new issue
Block a user