Multi-Tenancy: Page for when a user is not part of any team and registration is not enabled.

If a user does not have access to a team and you do not allow people to create a new team then the default is to display a 404 error. What would be the best way to override this behaviour and show a nice page such as your not a member of any team in the same style as the email verification where they can still access their profile etc. Thanks!
6 Replies
Forever
Forever10mo ago
my guess is to overwrite the IdentifyTenant class or if you dont want to canAccesTenant() => redirect from there
toeknee
toeknee10mo ago
You could be a middleware and if no team redirect to X
jeverington
jeveringtonOP10mo ago
@toeknee i've added a middleware to do this, but i've not been able to display a simple page without a tenant route. Any thoughts or example on how to do this?
toeknee
toeknee10mo ago
You should redirect them outside filament to a page with no tenancy
jeverington
jeveringtonOP10mo ago
Does that require using a second Panel? Or can I specify that a page in a panel doesn't have tenancy? I was hoping to do something like the Email verification page
toeknee
toeknee10mo ago
Just build a page completely outside of the panels? a standard php artisan make:livewire NoTenancy Then create a route to it, code / design the page as you see fit and use the route in the redirect
Want results from more Discord servers?
Add your server