Hi all, I am getting the message “Access Deneid” at logging by admin user.
I can not log in to my application at all.
How can I edit in sec_* tables to enable login for admin user?
Thank you
Hi all, I am getting the message “Access Deneid” at logging by admin user.
I can not log in to my application at all.
How can I edit in sec_* tables to enable login for admin user?
Thank you
Hello,
please tell us more - which version of jmix are you using, and what database, IntelliJ version is good to report also.
Were you able to login to your application before, or is it the first time you are starting it?
Normally, when you first create a project and start the application, liquibase will execute 010-init-user.xml, and ensure that there is a user table in the database for user entities, and there will be user ‘admin’ with password ‘admin’ added, as default.
If admin/admin is not working, go to the studio and the Jmix-Data Model check if there is User entity, and check it out by selecting the Text tab, not Designer tab.
At the top there is @Table annotation, name tells you which database table is being used for the user entity. Login to your database with some SQL tool and see what’s inside that table, are there any records, and is the admin record there?
Before further experimenting, backup your project and database as needed.
Kind regards,
Mladen
Hello @mbucan, thank you for your reply.
jmix version: 1.4.2
database: mySQL 5.7
intelliJ: 2024.3.1.1
I logged in to my application before, I developed this application two years ago and deployed it successfully to my web host, for some reason, I need to redeploy it to another host.
Are you building the application freshly from the source, and you can not login when you run it from the studio, or you can not login to another host when you copy the deployed application from the old host?
Of-course I did that, I opened ny source code into new intelliJ, and compile it, I created the database from my dump file, because I am not sure if the liquibase change logs ar synchronized with the database, so I created a secondary datastore and not depend on main datastore to disable liquibase update during application run.
but same database with same dump was working fine previously on my local machine and on my web host.
Hello!
If it is still an actual problem, just in case, please be aware that database with security entities (their tables starts with “SEC_” prefix) should be in the main data store because all jmix security entities are related to the main data store.
If problems with login for the user located in the main data store along with all security tables still occurs, please follow the steps proposed by @mbucan :
If admin/admin is not working, go to the studio and the Jmix-Data Model check if there is User entity, and check it out by selecting the Text tab, not Designer tab.
At the top there is @Table annotation, name tells you which database table is being used for the user entity. Login to your database with some SQL tool and see what’s inside that table, are there any records, and is the admin record there?
and let us know, whether a record for this user present in user table?
If yes, please check SEC_ROLE_ASSIGNMENT
table. Are there records related to this user id? are they contains name of a resource role with access to UI?
Regards,
Dmitry