Krishantha
Krishantha

Reputation: 11

change User entity(I think root entity) In a Jmix project

When I creating a Jmix project it is automatically creating data model with USER entity. when we customizing our Jmix project can we remove or change the user entity to what ever we want for example to 'Customer' entity?

Upvotes: 0

Views: 40

Answers (1)

knstvk
knstvk

Reputation: 637

The User entity is generated in a new Jmix project to provide user authentication and authorization right from the start.

You can change the entity, for example to add or remove some attributes, but be careful with username and password attributes because they implement the org.springframework.security.core.userdetails.UserDetails interface and are used in the authentication process. The Jmix Tutorial contains an example of adding attributes to the User entity.

You can rename the User entity and the corresponding table, but then you need to adjust the Liquibase changelog and the User list and detail views.

The User entity can also be removed if you reconfigure your project for an external authentication through OIDC or LDAP, or if you don't need the authentication at all.

Upvotes: 0

Related Questions