Skip to content

Add TokenRepository::all() for unexpired tokens - #608

Open
jackmcdade wants to merge 3 commits into
5.xfrom
feature/token-repository-all
Open

Add TokenRepository::all() for unexpired tokens#608
jackmcdade wants to merge 3 commits into
5.xfrom
feature/token-repository-all

Conversation

@jackmcdade

Copy link
Copy Markdown
Member

Summary

Test plan

  • TokenRepositoryTest::it_gets_all_non_expired_tokens passes
  • Sharing a draft preview link twice on an Eloquent-driver site reuses the same token

Made with Cursor

The cms TokenRepository contract now requires all(). Implement it so shareable preview links can reuse tokens on Eloquent-backed sites.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jackmcdade
jackmcdade changed the base branch from master to 5.x August 25, 2026 15:57

@ryanmitchell ryanmitchell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't all() just return all regardless of whether they are expired or not?

Do not filter by expiry — that is the caller's concern.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jackmcdade

Copy link
Copy Markdown
Member Author

Shouldn't all() just return all regardless of whether they are expired or not?

Yup. Silly robot. It got a bit eager with this PR.

CMS 6.29 assigns sequential order on save. Snapshot orders before the tree save so prefer-stable and prefer-lowest both pass.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

2 participants