Fix some broken API calls after RBAC update

This commit is contained in:
johnnyq
2026-07-25 16:59:03 -04:00
parent c509b7f693
commit e6daf00528
7 changed files with 12 additions and 602 deletions

View File

@@ -8,7 +8,7 @@ require_once '../require_get_method.php';
if (isset($_GET['quote_id'])) {
// quote via ID (single)
$id = intval($_GET['quote_id']);
$sql = mysqli_query($mysqli, "SELECT * FROM quotes WHERE quote_id LIKE '$id' AND quote_client_id = '$client_id'");
$sql = mysqli_query($mysqli, "SELECT * FROM quotes WHERE quote_id LIKE '$id' AND 1=1 " . apiClientScopeSql('quote_client_id') . "");
} else {
// All quotes (by client ID if given, or all in general if key permits)