Repository navigation
Redirect MuckRock Accounts UUIDs to document searches - #1446
Merged
Merged
Conversation
/documents/users/<uuid>/ and /documents/organizations/<uuid>/ look up the user or organization and redirect to a search for their documents, so MuckRock Accounts can link to them. Logged-out visitors sign in first, since the lookup requires a login. Refs MuckRock/squarelet#849 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MgSHjTBX3NVeqjfAzJAedj
Refs MuckRock/squarelet#849 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MgSHjTBX3NVeqjfAzJAedj
This was referenced Oct 26, 2026
|
Preview removed. |
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
allanlasser
marked this pull request as ready for review
October 26, 2026 20:09
Collaborator
|
I think https://squarelet-staging.herokuapp.com/ is the old staging url. Should be https://staging-accounts.muckrock.com/. |
Collaborator
|
Everything works. I think we should change two things:
|
They only ever redirect, so they don't need a page. An expired session now goes to sign-in instead of an error page. Refs MuckRock/squarelet#849 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MgSHjTBX3NVeqjfAzJAedj
This comment was marked as low quality.
This comment was marked as low quality.
eyeseast
approved these changes
Oct 27, 2026
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.
Adds UUID redirect routes that land on a search for a user's or organization's documents, so MuckRock Accounts profile cards can link here, for MuckRock/squarelet#849.
Companion PRs: MuckRock/squarelet#882, MuckRock/muckrock#2313
Will merge the two client-app PRs first, then the one that builds the URLs on Accounts.
Behaviour changes
/users/uuid/<uuid>/looks up the user and redirects to/documents/?q=user:<id>./organizations/uuid/<uuid>/looks up the organization and redirects to/documents/?q=organization:<id>./api/users/and/api/organizations/require a login. This is ok, since we expect people will access from a signed-in MuckRock Accounts session.uuidtolistUsers/listOrgsparams and anorgDocs()search helper. No backend change; theuuidfilters already exist.Migrations
What to check
/users/uuid/<your uuid>/lands on a search for your documents./organizations/uuid/<an org uuid>/lands on a search for that organization's documents.🤖 Generated with Claude Code
https://claude.ai/code/session_01MgSHjTBX3NVeqjfAzJAedj