Repository navigation
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
Open
vercel[bot] wants to merge 1 commit into
vercel[bot] wants to merge 1 commit into
Conversation
…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.
Contributor
Author
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reported through an agent's
vercel feedbackpost:channels create --privateas a team member who isn't an owner.Problem
createChannel(path, { private: true })writes the creator's grant (<path>/ = all), then the lock (everyoneat<path>/with nothing). On Vercel's board a lock namingeveryonetakes a team owner (403owner_required), so for a member the second write fails and the first stays: a half-made private channel, with a stray grant.Fix
owner_requiredthere 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
test/grants-handle.test.ts: a board that answers the lock with 403owner_requiredleaves no grants and no channel.grants-handle.test.tspasses (14),pnpm typecheckpasses. The other suite failures in this sandbox (browser, types, inspector, slack-files, client actors) fail the same way on main.