Files
opensourcepos/tests/Controllers
jekkos bdbc6d9cf1 fix(sales): gate getSearch behind reports_sales grant
Sales::getSearch() — the AJAX endpoint backing the Sales Takings list —
lacked the authorization check present on all sibling endpoints
(getRow, getEdit, postSave, getReceipt, getInvoice), allowing a cashier
with only the base sales grant to pull the full ledger.

- Add reports_sales guard with 403 JSON response on denial
- Add regression tests: cashier without grant → 403; employee with
  grant → search payload returned
- Clarify getSearch() coverage in SalesControllerTest comments
- Remove duplicate test methods introduced during initial commit
2026-09-07 10:54:35 +04:00
..