Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User list not working #341

Closed
misiekch opened this issue Oct 12, 2023 · 2 comments
Closed

User list not working #341

misiekch opened this issue Oct 12, 2023 · 2 comments

Comments

@misiekch
Copy link

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

@Laravel-Backpack Laravel-Backpack deleted a comment from welcome bot Oct 16, 2023
@promatik
Copy link
Contributor

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants