mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 02:58:26 +00:00
refactor(security): unify gateway scope authorization flows
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { AnyAgentTool } from "./tools/common.js";
|
||||
import { OWNER_ONLY_TOOL_ERROR, type AnyAgentTool } from "./tools/common.js";
|
||||
|
||||
export type ToolProfileId = "minimal" | "coding" | "messaging" | "full";
|
||||
|
||||
@@ -101,7 +101,7 @@ export function applyOwnerOnlyToolPolicy(tools: AnyAgentTool[], senderIsOwner: b
|
||||
return {
|
||||
...tool,
|
||||
execute: async () => {
|
||||
throw new Error("Tool restricted to owner senders.");
|
||||
throw new Error(OWNER_ONLY_TOOL_ERROR);
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user