Repository navigation
Admins get no access to other people's workspaces (v0.27.1) - #75
Merged
Merged
Conversation
Anthony: "in readm3 i can share to other users's workspaces is that a bug or what? seems pretty intrusive." A site admin was treated as owner of every organization and every document: organizations_list returned all workspaces (so the share and new-document pickers offered everyone's personal workspace), documents_list returned every document including private ones, and access()/orgRole()/validateTeam() let an admin read, edit, delete, or create documents anywhere. Now admin is a site role only. Workspace and document access come from membership, ownership, grants and share links, the same as for everyone. The admin_* operations (users list, claim) and the billing experiment view keep their explicit user.admin checks. Test: the super-admin claim test now asserts the admin cannot list, open, edit, delete or create in another user's workspace, and that the owner's document is untouched (fails on the old code). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
A site admin was treated as owner of every organization and document. The share and new-document pickers listed every user's personal workspace, the document list showed everyone's private documents, and an admin could open, edit, delete or create documents in any workspace.
Admin is now a site role only: workspace and document access come from membership, ownership, grants and share links, the same as for everyone. The
admin_*operations and the billing experiment view keep their explicituser.adminchecks.organizations_list,documents_list: memberships and accessible documents only, admins includedorgRole,access,validateTeam: no admin shortcutTypecheck clean;
test:server108 pass,test:bun228 pass.🤖 Generated with Claude Code