


























@@ -126,24 +126,24 @@ describe("Security: DM Allowlist", () => {
126126});
127127128128it("uses the ingress command gate for owner-only command authorization", async () => {
129-await expect(
130-resolveTlonCommandAuthorizationWithIngress({
131-senderShip: "~zod",
132-ownerShip: "zod",
133-useAccessGroups: true,
134-}),
135-).resolves.toMatchObject({
136-commandAccess: { authorized: true },
129+const authorized = await resolveTlonCommandAuthorizationWithIngress({
130+senderShip: "~zod",
131+ownerShip: "zod",
132+useAccessGroups: true,
137133});
138-await expect(
139-resolveTlonCommandAuthorizationWithIngress({
140-senderShip: "~nec",
141-ownerShip: "~zod",
142-useAccessGroups: true,
143-}),
144-).resolves.toMatchObject({
145-commandAccess: { authorized: false },
134+expect(authorized.commandAccess.requested).toBe(true);
135+expect(authorized.commandAccess.authorized).toBe(true);
136+expect(authorized.commandAccess.shouldBlockControlCommand).toBe(false);
137+expect(authorized.commandAccess.reasonCode).toBe("command_authorized");
138+139+const unauthorized = await resolveTlonCommandAuthorizationWithIngress({
140+senderShip: "~nec",
141+ownerShip: "~zod",
142+useAccessGroups: true,
146143});
144+expect(unauthorized.commandAccess.requested).toBe(true);
145+expect(unauthorized.commandAccess.authorized).toBe(false);
146+expect(unauthorized.commandAccess.shouldBlockControlCommand).toBe(false);
147147});
148148});
149149});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。