Jigar D
Jigar D
FFilament
Created by Jigar D on 6/6/2024 in #❓┊help
Tenancy Check in Model Policy
My Policy has the following code:
public function view(User $user, Model $model): bool
{
return $user->hasRole(Roles::SUPER_ADMIN)
|| (Filament::getTenant()->id === $user->tenant_id && $user->model->id == $model->id);
}
public function view(User $user, Model $model): bool
{
return $user->hasRole(Roles::SUPER_ADMIN)
|| (Filament::getTenant()->id === $user->tenant_id && $user->model->id == $model->id);
}
Is this the correct way? I am using PrivateChannel for Broadcasting and Authorization is failing because. /broadcasting/auth isn't aware of the tenant. Authorization callback does a check if user can view model $user->can('view', Model::find($id)); Any solution to make this work?
2 replies
FFilament
Created by Jigar D on 5/6/2024 in #❓┊help
In registration page, have dynamic steps for Wizard based of step's afterValidation
No description
7 replies