Sharing v2: per-workbook ACLs + share dialog + sidebar#1
Draft
asg017 wants to merge 2 commits into
Draft
Conversation
Adds per-workbook access control on top of the coarse datasette-sheets-access gate, backed by datasette-acl (0.6) and the reusable <datasette-acl-share-dialog> from datasette-acl-share (0.0.1a7), both hard deps. - SheetsWorkbookResource (type "sheets-workbook", parent=database, child=id) with sheets-view / sheets-edit / sheets-manage actions and Viewer / Editor / Manager roles (acl standard_roles factory). - Every sheets route enforces the per-workbook action via @check_permission. - Workbook creator is seeded a Manager grant; one-time startup backfill grants existing workbooks' creators Manager (CLOSED / owner-only) and applies acl's internal_migrations so the grant path doesn't depend on plugin startup order. - Share button + modal hosting the share dialog on the workbook page; presence resolves display names via datasette-user-profiles. - Sidebar "Sheets" entry; index href lands on the first database. Uses the acl 0.6 / acl-share 0.0.1a7 APIs throughout: grant(principal= Principal.actor(...)), synchronous build_roles_registry, and the share asset helper served via datasette-vite. Backend + frontend formatted to match the format baseline on main. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
8ebb639 to
5d07179
Compare
datasette-acl (0.6a1) and datasette-acl-share (0.0.1a7) are now published, so drop the [tool.uv.sources] local-path overrides that broke CI (`Distribution not found at: .../datasette-acl`). Loosen the datasette-user-profiles dev pin from ==0.1.0a6 to >=0.1.0a6, and drop the redundant local `--with ../…` paths from the `just dev` recipe (those plugins are dev-group deps resolved from PyPI). Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Lands the
sharing-v2migration for sheets:<datasette-acl-share-dialog>from datasette-acl-share.Part of the cross-repo document-sharing unification.
All dependencies now resolve from PyPI —
datasette-acl>=0.6a1anddatasette-acl-share>=0.0.1a7are published, so the[tool.uv.sources]local-path overrides are removed and thedatasette-user-profilesdev pin is loosened to>=0.1.0a6.🤖 Generated with Claude Code