thedevdojo / voyager

Voyager - The Missing Laravel Admin
https://voyager.devdojo.com
MIT License
11.78k stars 2.67k forks source link

Permissions get erased when saving own profile #5394

Closed cfpinto closed 3 years ago

cfpinto commented 3 years ago

Version information

Description

When editing my own profile and click save my permissions are erased, both in the users table and the user_role table.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Go to admin home
  2. Click on your avatar on the top right corner
  3. Click "Profile"
  4. Click "Edit My Profile"
  5. Click "Save"

Expected behavior

Permissions are expected to be preserved when saving user profile

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Only happens for logged in user. when editing somebody else's profile works just fine

MrCrayon commented 3 years ago

Is this a new install or it started happening with an update? Are you using custom Controllers/views?

cfpinto commented 3 years ago

Upgraded dependencies laravel 6 > 8 & voyager 1.1 (if i remember correctly) to 1.4.x-dev, not sure it was happening before users hadn't report it. No custom controllers or views.

thanks

MrCrayon commented 3 years ago

You probably forgot to set the controller in users BREAD settings. Make sure you follow all upgrade guides 1.1 to 1.2, 1.2 to 1.3 and 1.3 to 1.4 https://voyager-docs.devdojo.com/v/1.2/getting-started/upgrading

I'm moving this to discussions.