canvas-website/worker
Jeff Emmett 52503167c8 feat: flip permissions model - everyone edits by default, protected boards opt-in
NEW PERMISSION MODEL:
- All users (including anonymous) can now EDIT by default
- Boards can be marked as "protected" by admin - only listed editors can edit
- Global admins (jeffemmett@gmail.com) have admin on ALL boards
- Added BoardSettingsDropdown with view-only toggle for admins

Backend changes:
- Added is_protected column to boards table
- Added global_admins table
- New getEffectivePermission logic prioritizes: token > global admin > owner > protection status
- New API endpoints: /auth/global-admin-status, /admin/request, /boards/:id/info, /boards/:id/editors
- Admin request sends email via Resend API

Frontend changes:
- BoardSettingsDropdown component with protection toggle and editor management
- Updated AuthContext and Board.tsx to default to 'edit' permission
- isReadOnly now only true for protected boards where user is not an editor

Task: task-052

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 12:43:14 -05:00
..
migrations feat: flip permissions model - everyone edits by default, protected boards opt-in 2025-12-15 12:43:14 -05:00
shapes pin object, fix fathom, and a bunch of other things 2025-11-11 22:32:36 -08:00
AutomergeDurableObject.ts feat: improve social network presence handling and cleanup 2025-12-15 00:01:28 -05:00
assetUploads.ts fix asset upload rendering errors 2025-03-19 18:30:15 -07:00
automerge-init.ts feat: implement binary Automerge CRDT sync and open-mapping module 2025-12-04 19:45:02 -08:00
automerge-r2-storage.ts feat: implement binary Automerge CRDT sync and open-mapping module 2025-12-04 19:45:02 -08:00
automerge-sync-manager.ts feat: add version history, Resend email, CryptID registration flow 2025-12-10 14:21:50 -08:00
boardPermissions.ts feat: flip permissions model - everyone edits by default, protected boards opt-in 2025-12-15 12:43:14 -05:00
cryptidAuth.ts feat: add user dropdown menu, fix auth tool visibility, improve network graph 2025-12-12 18:41:53 -05:00
networkingApi.ts feat: add canvas users to CryptID connections dropdown 2025-12-05 23:08:16 -08:00
schema.sql feat: flip permissions model - everyone edits by default, protected boards opt-in 2025-12-15 12:43:14 -05:00
types.ts feat: flip permissions model - everyone edits by default, protected boards opt-in 2025-12-15 12:43:14 -05:00
wasm.d.ts feat: implement binary Automerge CRDT sync and open-mapping module 2025-12-04 19:45:02 -08:00
worker.ts feat: flip permissions model - everyone edits by default, protected boards opt-in 2025-12-15 12:43:14 -05:00