mirror of https://github.com/openclaw/openclaw.git
test(msteams): fix allowlist name-match expectations
This commit is contained in:
parent
2e36bdda85
commit
6a7c303dcc
|
|
@ -184,7 +184,7 @@ describe("msteams policy", () => {
|
|||
).toBe(true);
|
||||
});
|
||||
|
||||
it("allows allowlist when sender name matches", () => {
|
||||
it("blocks sender-name allowlist matches by default", () => {
|
||||
expect(
|
||||
isMSTeamsGroupAllowed({
|
||||
groupPolicy: "allowlist",
|
||||
|
|
@ -192,6 +192,18 @@ describe("msteams policy", () => {
|
|||
senderId: "other",
|
||||
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);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue