[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:
Relates
relates to MAGNOLIA-8229 Non JVM-default Locales are not used ... Closed
causality
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MGNLREST-734 Implement Sub-task Completed Valeria Robles-Garzon  
MGNLREST-735 Review Sub-task Completed Rishab Dhar  
MGNLREST-736 Pre-Integration QA Sub-task Completed Rishab Dhar  
MGNLREST-737 QA Sub-task Completed Robert Šiška  
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: DeveloperX
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


Generated at Mon Feb 12 07:02:38 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.