Laravel-Backpack / PermissionManager

Admin interface for managing users, roles, permissions, using Backpack CRUD
http://backpackforlaravel.com
Other
516 stars 166 forks source link

User list not working #341

Closed misiekch closed 11 months ago

misiekch commented 11 months ago

Bug report

What I did:

I installed Backpack PermissionManager package and when I try to open the user list I get the below error.

image

What I expected to happen:

See the user list.

What happened:

I am getting error.

What I've already tried to fix it:

After investigation i found out that this is related to backback_pro method which should return false (i am not using pro yet) and disable showing filters. At the moment backpack_pro() is giving me true because i have app_env set to 'testing'.

Backpack, Laravel, PHP, DB version:

backpack/crud 6.2.3 backpack/permissionmanager 7.1.0 laravel/framework 10.28.0 PHP 8.2.9

promatik commented 11 months ago

Hi @misiekch!

Thank you for the report, and sorry for the trouble.

Your investigation was correct 👌 Filters are only available in PRO, and returning true on backback_pro() for APP_ENV=testing is the expected behaviour, because while running tests we expect it to test all pro features.

Setting APP_ENV to testing should only happen when your in a "test" environment (running tests to the code), and not while developing.

For local development you should set APP_ENV=local. For production you should set APP_ENV=production.

I'll close this one for now, since it's not a real bug. Let me know if it works for you @misiekch 🙌

misiekch commented 11 months ago

Hi @promatik

Setting app_env to 'local' results in setting dev_mode to true (in basset.php) which i don't want to because it gives me physical paths to assets when including them. I am developing/testing on local server so i cannot use physical paths.

The actual problem was with showing filters - which i don't want to so far - but i have dealt with that by overriding user controller and removing filters from the user list.