core icon indicating copy to clipboard operation
core copied to clipboard

Problem when deleting Bolt user and creating a new one

Open eduardomart opened this issue 4 years ago • 2 comments

Bolt v4.1

I forgot the password to my user, so I went to the cli and the only options are: add, delete, list, so I deleted the user, and created a new one. However once I try to login with the new user, I see this: Screen Shot 2021-09-11 at 4 54 58 PM

Similar issue in 5.0 cli for 5.0 does have a reset-password option, however if you actually delete the username with ID=1 and create a new one, the same message in the screenshot above will appear as well

I think that Bolt wants a user to have an ID of 1, which can only be changed by editing the database. After editing the ID of the username to 1 does cause Bolt to log in normally.

eduardomart avatar Sep 11 '21 23:09 eduardomart

@bobdenotter can I work on this? I have in mind that if a user is being created from the CLI, we can check to see if there's any user with the id 1 and if not we set the current user's id to 1 and then persist. Or recursively shift the ids of existing users so that their ids should start from 1 and so on. Please advise.

abdellahrk avatar Jul 16 '22 21:07 abdellahrk