vanilophp / demo

Vanilo Demo Application
https://vanilo.io/docs/
190 stars 54 forks source link

Can't login user after updating user in the admin panel #12

Closed j-dohnalek closed 5 years ago

j-dohnalek commented 5 years ago

I am having issues login in a user after the following steps:

  1. created new role "analyst"
  2. assigned permissions to the role "list orders, ..., etc."
  3. created new user "john.doe@a.com" 3.1 assign user as "admin" and assigned user to the newly created "analyst" role
  4. logged off admin
  5. attempted to login "john.doe@a.com" and a message comes up "These credentials do not match our records." Even if I remove the users role and change him back to clients, the user cannot login.

Any help please?

j-dohnalek commented 5 years ago

Also I have cloned from the "master" branch

j-dohnalek commented 5 years ago

Figured it out, the problem appear when editing the user in the admin panel. The form for editing a user contains a field for password, not supplying password to the password field and saving it changes users password.

j-dohnalek commented 5 years ago

AppShell UserController@update method In the method there is a check for the existence of the password in the $request which it does exists but it is empty.

if ($request->has('password') && !empty($request->input('password')))
fulopattila122 commented 5 years ago

Preface: Please use the "stable" (0.3, 0.4 ...) versions of this repo. Everything in master is being heavily modified and possibly contains broken and/or non-integrated code

Fortunately, this bug was fixed ~2-3 days ago. What's the output of this command: composer show konekt/appshell|grep versions ?

Pulling the latest version of this repository and running composer install should solve the problem

j-dohnalek commented 5 years ago

I have downloaded the demo more than a week ago composer show konekt/appshell|grep versions outputs versions : * 0.9.10 composer installNothing to install or update

I redirected the route to a controller that overrides the \Konekt\AppShell\Http\Controllers\UserController for now.

fulopattila122 commented 5 years ago

Please run composer update konekt/appshell. That will solve the problem.

fulopattila122 commented 5 years ago

Did the composer update thingy solve the problem?

j-dohnalek commented 5 years ago

It says the same thing "Nothing to install or update". image

I have tried to run composer require konekt/appshell but it throws errors. image

fulopattila122 commented 5 years ago

True, gears needs to be updated as well. Please run: composer update konekt/appshell konekt/gears and let me know the results.

Thanks

j-dohnalek commented 5 years ago

running composer update konekt/appshell konekt/gears output: image

fulopattila122 commented 5 years ago

Looks better. What does composer show konekt/appshell|grep versions give?

j-dohnalek commented 5 years ago

composer show konekt/appshell|grep versions outputs: versions : * 0.9.10

fulopattila122 commented 5 years ago

It has to be minimum 1.0.0 (latest is 1.1.0).

Either download the latest vanilo/demo (master branch) where composer.lock is already on the latest version, or manage to update AppShell with composer update konekt/appshell.

As soon as composer show konekt/appshell|grep versions gives you at least 1.0.0, then the bug is gone.

j-dohnalek commented 5 years ago

Ok, great I will, thank you for help