Can't edit a resource if viewAny() is false (Model Policy)

Hi ! I'm trying to configure my policies and I want a basic user to only be able to edit his own details but not see others users, if my viewAny() method return false, I get a 403 error on the users/{id}/edit page. Can someone help me please ?
No description
4 Replies
ZedoX
ZedoX14mo ago
Consider creating a custom page (and use filament form builder) for this instead of a resource
Benjamin
BenjaminOP14mo ago
Okay thanks! I'll try that
John
John3mo ago
I had a similar case, and ended up with viewAny: true and a global scope on the model to limit access.
Want results from more Discord servers?
Add your server