refactor(security): centralize channel allowlist auth policy

This commit is contained in:
Peter Steinberger
2026-02-26 13:06:27 +01:00
parent eac86c2081
commit 892a9c24b0
12 changed files with 137 additions and 90 deletions

View File

@@ -55,6 +55,16 @@ describe("resolveGroupAllowFromSources", () => {
}),
).toEqual(["owner", "owner2"]);
});
it("can disable fallback to DM allowlist", () => {
expect(
resolveGroupAllowFromSources({
allowFrom: ["owner", "owner2"],
groupAllowFrom: [],
fallbackToAllowFrom: false,
}),
).toEqual([]);
});
});
describe("firstDefined", () => {