Mar 4th, 2009, 03:57 AM
DefaultLDAPAuthoritiesPopulator, toUpperCase problem for Turkish locale
As far as I see from the source code, the Granted Authorities are converted to uppercase in DefaultLDAPAuthoritiesPopulator.
However in the systems with the Locale TR(Turkish), the uppercase of the character 'i' is 'İ' (I with dot) instead of 'I'. Therefore, for the roles such as ROLE_ADMIN in the application context, it is converted as ROLE_ADMİN
and this causes access denial because of 'I', 'İ' mismatch.
As a workaround, I extended RoleVoter as MyRoleVoter and fixed the mismatch myself. Are there any better work arounds?
Or imho, it would be better if it is possible to provide locale as a field for 'DefaultLDAPAuthoritiesPopulator' (via setter) so role.toUpperCase() can be replaced with role.toUpperCase(getLocale());
Should I go for a feature request?
Tags for this Thread