[MGNLREST-730] Only JVM default locales are checked on REST requests Created: 09/Jun/23 Updated: 13/Jul/23 Resolved: 13/Jul/23 |
|
| Status: | Closed |
| Project: | Magnolia REST Framework |
| Component/s: | delivery |
| Affects Version/s: | 2.2.19 |
| Fix Version/s: | 2.2.21 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Roberto Gaona | Assignee: | Valeria Robles-Garzon |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Σ Remaining Estimate: | Not Specified | Remaining Estimate: | Not Specified |
| Σ Time Spent: | Not Specified | Time Spent: | Not Specified |
| Σ Original Estimate: | Not Specified | Original Estimate: | Not Specified |
| Issue Links: |
|
|||||||||||||||||||||||||
| Sub-Tasks: |
|
|||||||||||||||||||||||||
| Template: | ||||||||||||||||||||||||||
| Acceptance criteria: |
Empty
|
|||||||||||||||||||||||||
| Task DoD: |
[X]*
Doc/release notes changes? Comment present?
[X]*
Downstream builds green?
[X]*
Solution information and context easily available?
[X]*
Tests
[X]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
|||||||||||||||||||||||||
| Bug DoR: |
[X]*
Steps to reproduce, expected, and actual results filled
[X]*
Affected version filled
|
|||||||||||||||||||||||||
| Epic Link: | Support | |||||||||||||||||||||||||
| Sprint: | DevX 41, DevX 42 | |||||||||||||||||||||||||
| Story Points: | 3 | |||||||||||||||||||||||||
| Team: | ||||||||||||||||||||||||||
| Work Started: | ||||||||||||||||||||||||||
| Approved: |
Yes
|
|||||||||||||||||||||||||
| Description |
|
Currently, there are two different approaches for handling locale tags being used in Magnolia. One, takes into account the JVM default locales or the tag is well-formed, but on REST requests, the handling only checks against the default locales, not allowing the usage of other locales like en_TH or en_TW. This could be adapted to make use of the isLocaleValid class on all cases to allow more flexible usages of locales.
Filter in use for the Delivery Endpoint: https://git.magnolia-cms.com/projects/MODULES/repos/rest/browse/magnolia-rest-jcr-delivery/src/main/java/info/magnolia/rest/delivery/jcr/i18n/I18nContainerRequestFilter.java#126 Behaviour to mimic: https://git.magnolia-cms.com/projects/PLATFORM/repos/main/browse/magnolia-core/src/main/java/info/magnolia/cms/i18n/AbstractI18nContentSupport.java#163 |