laratrust
laratrust copied to clipboard
Add support for custom checker classes. Introducing LaratrustUserCheckerInterface, LaratrustRoleCheckerInterface
Non breaking change, when developers are using the default checkers. If someone's not, then config needs to be adjusted:
'checker' => 'default' split into two parts
- 'user_checker' => 'default'
- 'role_checker' => 'default'
To set a custom checker for a User entity you have to use a fully qualified class name eg: 'user_checker' => \App\Checkers\MyCustomUserChecker::class And the checkers have to implement LaratrustUserCheckerInterface or LaratrustRoleCheckerInterface which contains all functions from the abstract checkers.
I'll take a look into this PR after releasing the 7.x version for Laravel 9.
BTW thank you for the PR
Hi @santigarcor!
Any update on this?
This was fixed by #616 , closing this. Thank you for your help!