Model Policies and Admin

If Im restricting access to the admin to a few select users using canAccessFilament(), do I need to put additional checks on the model policies or should I just return true for most of them? Right now I am simply checking their access on the model with that same canAcccessFilament(), but not sure if thats overkill. Im simply doing it in __construct, assigning it to a variable, and checking returning that at view, create, etc.
3 Replies
toeknee
toeknee2y ago
To me it is completely up to you, and your use case with what needs restricting. I've just been restricting access based on the canAccessFilament and email address ending in. Then I have permissions for their relative permissions within the model policy.
Mark Chaney
Mark ChaneyOP2y ago
@toeknee_iom well im pretty much checking the same thing at two different locations, which im starting to think is a bit moot.
Dan Harrin
Dan Harrin2y ago
you can probably just delete the model policies
Want results from more Discord servers?
Add your server