Panels visibility
I have this use case where I would want to setup the panels in such way:
1) have multiple panels but not all users should see all the panels
2) when login, they should use /login instead of /{panel}/login, it will bring them to panel they have access after login
what api can I use to configure?
11 Replies
bump this just in case it was push too far down for anyone to notice it...
How would you know which panel to send them to if they can access multiple panels?
obviously, you'd need a custom middleware, but still
Probably maintain a table to control, but assume I have a source or logic to control, how would I set it in a middleware?
@awcodes it would be something certain role can access specific panels, and after login it will first point them to the last panel they accessed like $user->last_panel
I'd overwrite the login response and redirect them there.
He's trying to have one centralized login though, instead of per panel login.
Yeah, noticed that after sending π
I did think this centralized login is the easy part of my question π
would a panel even work if it doesn't have
->login()
and the user is authenticated somewhere else?
i would think it would.
but haven't tried it.You could register your own route and copy Login::class as a baseline
as long as they are authenticated, i would think the panel wouldn't care how they logged in
Yeah will try this login