Skip to content

[6.x] Public dictionaries#15029

Merged
jasonvarga merged 6 commits into
6.xfrom
public-dictionaries
Jul 20, 2026
Merged

[6.x] Public dictionaries#15029
jasonvarga merged 6 commits into
6.xfrom
public-dictionaries

Conversation

@duncanmcclean

Copy link
Copy Markdown
Member

This pull request makes the dictionary fieldtype's route accessible outside of the Control Panel and to unauthenticated users.

Use case

In Forms Pro, we have an option to give each form its own page, which ultimately renders a PublishContainer on the frontend to unauthorized users.

The dictionary fieldtype uses an AJAX request on mount and when searching to fetch relevant options. However, as the dictionary fieldtype's route was in the /cp namespace, it was restricted to logged in users only.

This PR changes that (it's now open to guests) and adds authorization to ensure only specific dictionaries can be requested on the frontend.

duncanmcclean and others added 5 commits July 17, 2026 17:21
Process::run(['locale', '-a']) was being executed on every request
since the dictionary options route was made public. Installed
locales never change at runtime, so cache the result.
The route was made public without a rate limiter, unlike the other
public routes in this group. Add a statamic.dictionaries limiter
following the existing pattern.
@jasonvarga
jasonvarga enabled auto-merge (squash) July 20, 2026 19:03
@jasonvarga
jasonvarga merged commit 369547b into 6.x Jul 20, 2026
22 checks passed
@jasonvarga
jasonvarga deleted the public-dictionaries branch July 20, 2026 19: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.

2 participants