mirror of
https://github.com/jez500/pricebuddy.git
synced 2026-11-24 19:58:13 +01:00
Stores are shared by all users, but the stores API only returned the caller's
own stores. Stores with no creator, such as Amazon AU from the seed data, were
missing from every user's results.
- GET /api/stores, filter[domain], filter[domains] and GET /api/stores/{id}
return every store.
- The urls and products includes return only the caller's rows. The user
include returns the creator only to the creator.
- A new StorePolicy lets any user create and edit a store. Only an admin can
delete one, in the API (403) and in the Filament UI.
- user_id now records who created a store. The server sets it, and an edit
does not change it. Store::creating() fills it from the logged-in user, else
the oldest admin. Adding a URL in a job passes the user who added it.
- A migration sets existing NULL user_id values to the oldest admin.