Skip to content

Sharing v2: per-workbook ACLs + share dialog + sidebar#1

Draft
asg017 wants to merge 2 commits into
mainfrom
asg017/sharing-v2
Draft

Sharing v2: per-workbook ACLs + share dialog + sidebar#1
asg017 wants to merge 2 commits into
mainfrom
asg017/sharing-v2

Conversation

@asg017

@asg017 asg017 commented May 27, 2026

Copy link
Copy Markdown
Collaborator

Lands the sharing-v2 migration for sheets:

  • Per-workbook resource/roles with a creator-grant + upgrade backfill.
  • Embeds <datasette-acl-share-dialog> from datasette-acl-share.
  • datasette-sidebar entry; index href lands on the first database.

Part of the cross-repo document-sharing unification.

All dependencies now resolve from PyPI — datasette-acl>=0.6a1 and datasette-acl-share>=0.0.1a7 are published, so the [tool.uv.sources] local-path overrides are removed and the datasette-user-profiles dev pin is loosened to >=0.1.0a6.

🤖 Generated with Claude Code

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>
@asg017 asg017 force-pushed the asg017/sharing-v2 branch from 8ebb639 to 5d07179 Compare June 23, 2026 16:48
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>
@asg017 asg017 marked this pull request as draft June 24, 2026 00:28
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.

1 participant