From 4bfe60197e8c390a8701053228cd50c5391f37d3 Mon Sep 17 00:00:00 2001 From: Matt Toohey Date: Mon, 9 Nov 2026 10:09:20 +1100 Subject: [PATCH] fix(relay): say "channel owner or admin" in the call_webhook save refusal (#9169) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary The SEC-006 save gate in `handle_workflow_def` refuses a `call_webhook` workflow unless the saver is an owner or admin. It looks up the role with `get_member_role(community, channel_id, …)`, so this is the saver's **channel** role. The refusal text said only "require the owner or admin role", which reads as the community owner or admin. Clients now show the relay's refusal text when a save is refused (block/buzz-app is about to pass it through as written), so a member would be sent after the wrong role. The refusal now says: > forbidden: workflows with call_webhook actions require the **channel** owner or admin role - The role check is unchanged. - The `forbidden:` prefix is unchanged, so clients still treat it as a permission refusal. - This now matches the desktop helper copy under the Webhook URL field ("Webhook steps require a channel owner or admin"). No test, fixture, doc or client copy in this repo quoted the old text, so this is a one-line change. ### Related issue None found for the save-path wording. #5135 (open) rewrites the SEC-006 refusals on the **trigger** path (`handle_workflow_trigger`) but leaves this save-path string alone, so the two don't overlap. ### Testing Not verified locally: no tests, builds, clippy or rustfmt were run, and the commit was pushed with `--no-verify`. CI is the first check. The change only edits a string literal. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: mtoohey Co-authored-by: Claude Opus 5.5 --- crates/buzz-relay/src/handlers/command_executor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/buzz-relay/src/handlers/command_executor.rs b/crates/buzz-relay/src/handlers/command_executor.rs index 73d4298517..1772ec3da8 100644 --- a/crates/buzz-relay/src/handlers/command_executor.rs +++ b/crates/buzz-relay/src/handlers/command_executor.rs @@ -697,7 +697,7 @@ async fn handle_workflow_def( .map_err(|e| IngestError::Internal(format!("error: role check: {e}")))?; if !matches!(role.as_deref(), Some("owner") | Some("admin")) { return Err(IngestError::Rejected( - "forbidden: workflows with call_webhook actions require the owner or admin role" + "forbidden: workflows with call_webhook actions require the channel owner or admin role" .into(), )); }