mirror of
https://github.com/itflow-org/itflow
synced 2026-07-30 04:07:15 +00:00
Add user-based RBAC for API keys
API keys now run as a user and inherit that user's module, operation, and client permissions. Drops per-key client scoping and removes existing keys (must be recreated). Adds an edit modal to change a key's user.
This commit is contained in:
@@ -12,7 +12,7 @@ if (isset($_GET['quote_id'])) {
|
||||
|
||||
} else {
|
||||
// All quotes (by client ID if given, or all in general if key permits)
|
||||
$sql = mysqli_query($mysqli, "SELECT * FROM quotes WHERE quote_client_id LIKE '$client_id' ORDER BY quote_id LIMIT $limit OFFSET $offset");
|
||||
$sql = mysqli_query($mysqli, "SELECT * FROM quotes WHERE 1=1 " . apiClientScopeSql('quote_client_id') . " ORDER BY quote_id LIMIT $limit OFFSET $offset");
|
||||
}
|
||||
|
||||
// Output
|
||||
|
||||
Reference in New Issue
Block a user