import { describe, expect, it } from "vitest"; import type { OpenClawConfig } from "../config/config.js"; import { resolveCommandAuthorization } from "./command-auth.js"; import type { MsgContext } from "./templating.js"; import { installDiscordRegistryHooks } from "./test-helpers/command-auth-registry-fixture.js";
installDiscordRegistryHooks();
describe("senderIsOwner only reflects explicit owner authorization", () => {
it("does not treat direct-message senders as owners when no ownerAllowFrom is configured", () => { const cfg = {
channels: { discord: {} },
} as OpenClawConfig;
it("does not treat group-chat senders as owners when no ownerAllowFrom is configured", () => { const cfg = {
channels: { discord: {} },
} as OpenClawConfig;
it("senderIsOwner is false when ownerAllowFrom is configured and sender does not match", () => { const cfg = {
channels: { discord: {} },
commands: { ownerAllowFrom: ["456"] },
} as OpenClawConfig;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.