Skip to content

Sharing v2: profiles directory + people-search API - #1

Merged
asg017 merged 6 commits into
mainfrom
asg017/sharing-v2
Jun 16, 2026
Merged

asg017 merged 6 commits into
mainfrom
asg017/sharing-v2

Conversation

@asg017

@asg017 asg017 commented May 27, 2026 •

Copy link
Copy Markdown
Collaborator

Lands the sharing-v2 profiles work:

  • User profiles directory with editable profile pages.
  • /-/profiles/api/search (people + avatars), consumed by the share dialog and the datasette-acl actor picker.
  • resolve_profile_actors(datasette, actor_ids) helper that consumers opt into to back actors_from_ids, instead of hijacking core's hook by being installed.
  • editable_fields config to lock fields from user edits (enforced server-side), e.g. when an upstream auth plugin owns email/name/avatar.

Part of the cross-repo document-sharing unification.

🤖 Generated with Claude Code

asg017 and others added 6 commits May 26, 2026 12:14
Refs: research-sharing/todo/phase-03-profiles-directory/01-search-api-and-indexes.md, research-sharing/04-user-profiles-plan.md
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Refs: research-sharing/todo/phase-03-profiles-directory/02-actors-from-ids-and-subhook.md, research-sharing/04-user-profiles-plan.md
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Refs: research-sharing/todo/phase-03-profiles-directory/03-valid-actors-and-consolidation.md, research-sharing/04-user-profiles-plan.md
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ve_actors

Prefix the sub-hook with the plugin name (matching
datasette_user_profile_sections) so its provenance is clear and it no
longer reads as a generic core Datasette hook.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Stop implementing core's firstresult=True actors_from_ids hook (which
locked out every other identity source just by being installed) and the
datasette_user_profiles_resolve_actors sub-hook that existed to work
around it. Instead expose resolve_profile_actors(datasette, actor_ids) as
a plain function consumers can opt into to back actors_from_ids
themselves.

Also resolve IDs via json_each() over a serialized JSON array instead of
dynamically built ? placeholders.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Every profile field is user-editable by default. Set
plugins.datasette-user-profiles.editable_fields.<field> = false to stop
users overwriting fields an upstream source already owns (e.g. a GitHub
auth plugin that puts email/name into the actor JSON).

Enforced server-side: the update endpoint preserves locked fields'
stored values and the photo upload/delete endpoints return 403 when
"avatar" is locked. The edit page renders locked fields disabled.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@asg017
asg017 merged commit b01725f into main Jun 16, 2026
10 checks passed
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