Problem with creating new user this default Jmix project

I created the new Jmix project from scratch - Jmix 1.1.0, db postgres. Entered only project name, project type (the first one from the list) and swithc to postgresl db instead default.

  1. Run Jmix application.
  2. Click on link to http://localhost:8080 in Run console
  3. Login as default admin.
  4. Navigate to Application->Users->Create
  5. Create another user, remember the password and username.
  6. Logoff as admin.
  7. Enter the username and password of new user.
  8. Got red “Login failed. Unknown login name or bad password” message.

The new user was successfully created in db:

I haven’t debug this yet. What am I doing wrong?

Set a role for the user. For example predefined ui minimal.

1 Like

Andrey, thank you very much. It works after I assigned a role to new user.
Why some default role with minimum access is not assigned when creating a new user? It’s a bit confusing that a new user can’t login with correct username and password.
At least other exception can be thrown in case of no role assigned.

We cannot give any minimal UI permissions to new users automatically, because there may be users that are not allowed to enter UI, for example REST integrations.

We’ll think about throwing a different exception on login, but even now you should have seen a warning in the application console about the reason why the user cannot login. Anyway, thanks for the feedback, we’ve added a note about the ui-minimal role to the docs: Users :: Jmix Documentation