Default new sub-accounts to store:create+store:manage, backfill empty permissions on /partner/me, and treat legacy store staff as allowed to mutate.
Co-authored-by: Cursor <cursoragent@cursor.com>
Allow store:create/manage sub-accounts to edit, open/close, and re-upload media; dedupe ENV photos on write/read and replace via media API.
Co-authored-by: Cursor <cursoragent@cursor.com>
Gate dashboard/stores/orders by permission and move dashboard auth to method level so leaderboard stays open without toasting 403s.
Co-authored-by: Cursor <cursoragent@cursor.com>
Expose same-primary ranking on home/me for all staff including warehouse roles, and open the leaderboard API without business permission gates.
Co-authored-by: Cursor <cursoragent@cursor.com>