Closed njugunamwangi closed 2 months ago
First off, it doesn't look like your redirectTo
callback is actually returning a value. Take a look at that.
Beyond that, you need to troubleshoot the 403 and see why it's failing. Do some debugging in your authorization policies or gates. There is not nearly enough information for me to see what the issue is, and it's likely to be something specific to your app, not a problem with this package.
My application has subdomains for every user role and on trying to redirect to a different panel i get a 403 Forbidden,
Here's how to reproduce the error
UserResource(Table Actions):
->actions([ Impersonate::make('impersonate') ->redirectTo(function($record) { switch (true) { case $record->hasRole(Role::DOCTOR): route('filament.doctor.pages.dashboard'); break;
])
User.php (model)
class User extends Model implements FilamentUser {
}