Skip to content

Ensure `preferred_language` always have a value.

Kassio Borges requested to merge kassio/ensure-user-preferred-language into master

What does this MR do?

Users created before 9.2 can have the preferred_language empty (NULL). This way, on the User preferences screen, a user might update the their language to Bulgarian, the first language of the language selector. To avoid that, and possible other problems, the User#preferred_language is fall backing to I18n.default_locale, which is already the default value for new users.

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Merge request reports