creativetimofficial / ct-argon-dashboard-pro-laravel

Argon Pro Dashboard For Laravel Framework 11.x and Up
http://argon-dashboard-pro-laravel.creative-tim.com/
32 stars 13 forks source link

User cannot change his password in profile's settings #27

Closed sztanga closed 3 years ago

sztanga commented 3 years ago

Prerequisites

Please answer the following questions for yourself before submitting an issue.

Expected Behavior

When I change my password in the profile I want the password to be changed

Current Behavior

Some users have reported that they have an error when trying to update their password (they probably use autofill but it shouldn't matter)

Failure Information (for bugs)

I couldn't replicate this issue

Steps to Reproduce

Couldn't replicate it, some of the users have send me a video where they enter current password, new password and repeating new password, then they got an error from here (profile controller):

if (Gate::denies('update', auth()->user())) {
    return back()->withErrors([
        'not_allow_password' => __('You are not allowed to change the password for a default user.')
    ]);
}

Context

Didn't change anything with regards to user profile. I use latest version of argon pro on ubuntu 20.04 with LAMP stack, php 7.4, mysql 8

Failure Logs

None

teamupdivision commented 3 years ago

Hello @sztanga! Thanks for using our products. Can you please let me know what is the value of IS_DEMO in your .env file.

Thank you

sztanga commented 3 years ago

Thanks for your response!

IS_DEMO=false

The bug was fixed when I removed this part of the code from ProfileController but I think its not a solution:

if (Gate::denies('update', auth()->user())) {
    return back()->withErrors([
        'not_allow_password' => __('You are not allowed to change the password for a default user.')
    ]);
}
teamupdivision commented 3 years ago

Hello,

We have fixed the issue and pushed it to the project. You can download the archive from the downloads section in the Creative Tim website.

All the best

sztanga commented 3 years ago

Great stuff, thanks for quick response!