mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 07:37:27 +00:00
test(msteams): fix allowlist name-match expectations
This commit is contained in:
@@ -184,7 +184,7 @@ describe("msteams policy", () => {
|
|||||||
).toBe(true);
|
).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("allows allowlist when sender name matches", () => {
|
it("blocks sender-name allowlist matches by default", () => {
|
||||||
expect(
|
expect(
|
||||||
isMSTeamsGroupAllowed({
|
isMSTeamsGroupAllowed({
|
||||||
groupPolicy: "allowlist",
|
groupPolicy: "allowlist",
|
||||||
@@ -192,6 +192,18 @@ describe("msteams policy", () => {
|
|||||||
senderId: "other",
|
senderId: "other",
|
||||||
senderName: "User",
|
senderName: "User",
|
||||||
}),
|
}),
|
||||||
|
).toBe(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("allows sender-name allowlist matches when explicitly enabled", () => {
|
||||||
|
expect(
|
||||||
|
isMSTeamsGroupAllowed({
|
||||||
|
groupPolicy: "allowlist",
|
||||||
|
allowFrom: ["user"],
|
||||||
|
senderId: "other",
|
||||||
|
senderName: "User",
|
||||||
|
allowNameMatching: true,
|
||||||
|
}),
|
||||||
).toBe(true);
|
).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user