jmix
jmix copied to clipboard
Authentication is not set in AuthenticationEventListener
Environment
Jmix version: <2.3.0>
Bug Description
In standard User entity add new field @Transient private String language;
In AuthenticationEventListener add the following lines of code User user = (User) currentAuthentication.getUser(); user.setLanguage(currentAuthentication.getLocale().getLanguage().toLowerCase());
Run the project Error Authentication is not set. Use SystemAuthenticator in non-user requests like schedulers or asynchronous calls.