pierobot / mangapie

This is a self-hosted server for archived manga.
BSD 3-Clause "New" or "Revised" License
65 stars 9 forks source link

Roles tuning is bugged #145

Closed donotos closed 4 years ago

donotos commented 4 years ago

Hello I wanted to test using roles to restrict access to some library but it does not work as expected. When i tick library 1 and save, it does not keep the change and no library is selected when i go back to the role. When i tick library 2 and save all library are selected when i go back to the role. It does one of the two above when i tick library 3 an 4.

Thanks.

pierobot commented 4 years ago

Hi, I've found this to be caused by a lack of permissions being created for libraries after migrations. Try running php artisan db:seed and let me know if that fixes it for you.

I'll find a way to have this done automatically. I'll sticky in case someone else has this problem.

donotos commented 4 years ago

does not seems to work. i used --force but it's the same:

root@mangapie:/var/www/mangapie# php artisan db:seed --force
Seeding: UsersTableSeeder
Users table is not empty, skipping...
Seeding: GenresTableSeeder
Genres table is not empty, skipping...
Seeding: PermissionsTableSeeder
Seeding: RolesTableSeeder
Database seeding completed successfully.
pierobot commented 4 years ago

Did you try with the latest commit? The checkboxes and permissions were set correctly once I tried ticking and saving them again.

donotos commented 4 years ago

yeah thanks the latest commit resolved the issue.