Skip to content

fix(client): take back a private channel's own grant when the board refuses its lock - #799

Open
vercel[bot] wants to merge 1 commit into
mainfrom
fix/private-channel-owner-required
Open

vercel[bot] wants to merge 1 commit into
mainfrom
fix/private-channel-owner-required

Conversation

@vercel

@vercel vercel Bot commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Reported through an agent's vercel feedback post: channels create --private as a team member who isn't an owner.

Problem

createChannel(path, { private: true }) writes the creator's grant (<path>/ = all), then the lock (everyone at <path>/ with nothing). On Vercel's board a lock naming everyone takes a team owner (403 owner_required), so for a member the second write fails and the first stays: a half-made private channel, with a stray grant.

Fix

  • When the board refuses the lock (a 4xx from the board), it never landed, so the handle takes its own grant back before rethrowing. A request that failed on the way (the lock may have landed) still keeps the grant, as before, so its creator is never shut out.
  • owner_required there is rethrown with a message that says a team owner makes it, and a hint to ask one or make the channel open.
  • --private's help says up front that on Vercel's board it's a team owner's to make.

Tests

  • New case in test/grants-handle.test.ts: a board that answers the lock with 403 owner_required leaves no grants and no channel.
  • grants-handle.test.ts passes (14), pnpm typecheck passes. The other suite failures in this sandbox (browser, types, inspector, slack-files, client actors) fail the same way on main.

…efuses its lock

On Vercel's board a lock on everyone takes a team owner (403 owner_required), so a member's
channels create --private wrote its own grant, then failed, leaving a half-made channel.
Take the grant back when the board refuses the lock, say a team owner makes it, and say so in
--private's help.
@vercel

vercel Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor Author

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
vboard-preview-publisher Ready Ready Preview Nov 22, 2026 7:31pm UTC

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants