diff --git a/packages/api/src/__tests__/assistant-router.test.ts b/packages/api/src/__tests__/assistant-router.test.ts index bd98bc5..97a7fc8 100644 --- a/packages/api/src/__tests__/assistant-router.test.ts +++ b/packages/api/src/__tests__/assistant-router.test.ts @@ -600,6 +600,7 @@ describe("assistant router tool gating", () => { expect(adminNames).toContain("test_ai_connection"); expect(adminNames).toContain("test_smtp_connection"); expect(adminNames).toContain("test_gemini_connection"); + expect(adminNames).toContain("list_system_role_configs"); expect(adminNames).toContain("update_system_role_config"); expect(adminNames).toContain("list_webhooks"); expect(adminNames).toContain("get_webhook"); @@ -613,11 +614,11 @@ describe("assistant router tool gating", () => { expect(userNames).not.toContain("get_system_settings"); expect(userNames).not.toContain("update_system_settings"); expect(userNames).not.toContain("test_ai_connection"); + expect(userNames).not.toContain("list_system_role_configs"); expect(userNames).not.toContain("update_system_role_config"); expect(userNames).not.toContain("list_webhooks"); expect(userNames).not.toContain("create_webhook"); expect(userNames).toContain("get_ai_configured"); - expect(userNames).toContain("list_system_role_configs"); }); it("keeps holiday calendar mutation tools admin-only while leaving read tools available", () => { diff --git a/packages/api/src/router/assistant.ts b/packages/api/src/router/assistant.ts index 76b546b..9bf19f4 100644 --- a/packages/api/src/router/assistant.ts +++ b/packages/api/src/router/assistant.ts @@ -335,6 +335,7 @@ const ADMIN_ONLY_TOOLS = new Set([ "test_ai_connection", "test_smtp_connection", "test_gemini_connection", + "list_system_role_configs", "update_system_role_config", "list_webhooks", "get_webhook",