Multi-tenancy: How to prevent user to access Team Registration Page to register many teams without active subscription? #12732
Unanswered
devhoussam1998
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Package
Panel builder
Package Version
v3.2.71
How can we help you?
By default when user create an account it should create a default team once he/she do that then he should made a subscribtion to create inlimited teams.
I'm using
filament-cashier-billing-provider
package to Integrate Laravel Cashier Stripe support into Filament's multi-tenant panels.in
'register' => MenuItem::make()
I usevisible
to conditionaly show/hide the team registration page but the problem is the user can access to the page by only writing it's URLapp/new
How I could prevent this trick.I made a middleware CanAccessRegisterTeam to achieve this but I get this error message:
Missing required parameter for [Route: filament.app.pages.dashboard] [URI: app/team/{tenant}/dashboard] [Missing parameter: tenant].
TASKS:
**Step 1: Checks if the user is authenticated. If not, it redirects to the login page.
Step 2: Checks if the user has at least one team stored in the database. If yes, it redirects to the dashboard.
Step 3: Checks if the user's team has an active subscription. If not, it redirects to the dashboard.**
CanAccessRegisterTeam.php
AppPanelProvider.php
Beta Was this translation helpful? Give feedback.
All reactions