Tenancy: access tenant in `canAccessPanel` function
Hi,
The
canAccessPanel
function on the User
model is an ideal place to check if the users tenant has access to that functionality.
Unfortunately the Tenant
model is not loaded until after the firs invocation of canAccessPanel
.
User.php
AppServiceProvider.php
App\Features\Tickets.php
Is it possible to get the tenant loaded in the canAccessPanel
method or is there another good way to achieve this?3 Replies
Hi, I've changed my approach somewhat.
I have created a custom billing provider.
I've come across a new bug:
If I access the appPanelProvider or from a different provider the result of the
getPanel
call is always app
Solution
there is a function getCurrentPanel not sure if it will help
Awesome, this worked!!