main ← fix-filter-restricted-email-template-keys-from-site-text-search
opened 12:55PM - 24 Dec 25 UTC
Admins searching for "confirm_old_email" in site texts would see the restricted …keys in results, click them, and hit a confusing "Access Denied" page. Now these keys are filtered out of search results entirely.
Also added `confirm_old_email_add` to the restricted list - it was missing but has the same restriction need as `confirm_old_email`.
Refactored so `SiteTextsController::RESTRICTED_KEYS` is the single source of truth, with `EmailTemplatesController` deriving from it.
Ref - https://meta.discourse.org/t/377902
Ref - https://meta.discourse.org/t/392070
**No more listed in email templates**
<img width="1418" height="1001" alt="2025-12-24 @ 13 49 22" src="https://github.com/user-attachments/assets/339f69c5-2068-4683-9ba9-71e2393f5ac2" />
**No more listed in site texts**
<img width="1418" height="1001" alt="2025-12-24 @ 13 48 16" src="https://github.com/user-attachments/assets/10eff780-d8ec-4a9a-83e4-6d521d31e5ea" />