TIPOFF / checkout

Laravel Package for Ecommerce Checkouts
MIT License
0 stars 1 forks source link

Add nova index, show, delete tests by role and index role location filtering test #77

Closed pdbreen closed 3 years ago

pdbreen commented 3 years ago

Brings across role based nova resource checks for index, show and delete and adds an additional role based test for index the confirms resources are / are not filtered automatically by location when appropriate.

NOTE: the index filtering by location in Nova doesn't actually prevent those users from interacting with resources that are in different locations. To properly enforce that a new permission is needed and all of the policies need to become smarter. Here's how I'd do it:

Edit: If you go this route, the index location filtering in Nova could change from a role based exclusion to a permission based exclusion. If the user has the "all locations" permission, the location filtering isn't applied.