mirror of
https://github.com/itflow-org/itflow
synced 2026-07-26 18:27:14 +00:00
Add more enforceClientAccess to agent ajax gets
This commit is contained in:
@@ -308,6 +308,8 @@ if (isset($_GET['get_client_contacts'])) {
|
||||
|
||||
$client_id = intval($_GET['client_id']);
|
||||
|
||||
enforceClientAccess();
|
||||
|
||||
$contact_sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT contact_id, contact_name, contact_primary, contact_important, contact_technical FROM contacts
|
||||
@@ -332,6 +334,8 @@ if (isset($_GET['get_client_assets'])) {
|
||||
|
||||
$client_id = intval($_GET['client_id']);
|
||||
|
||||
enforceClientAccess();
|
||||
|
||||
$asset_sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT asset_id, asset_name, contact_name FROM assets
|
||||
@@ -357,6 +361,8 @@ if (isset($_GET['get_client_locations'])) {
|
||||
|
||||
$client_id = intval($_GET['client_id']);
|
||||
|
||||
enforceClientAccess();
|
||||
|
||||
$locations_sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT location_id, location_name FROM locations
|
||||
@@ -381,6 +387,8 @@ if (isset($_GET['get_client_vendors'])) {
|
||||
|
||||
$client_id = intval($_GET['client_id']);
|
||||
|
||||
enforceClientAccess();
|
||||
|
||||
$vendors_sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT vendor_id, vendor_name FROM vendors
|
||||
@@ -1078,6 +1086,4 @@ if (isset($_GET['get_credential_via_id'])) {
|
||||
$check_recent_view = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT(log_id) AS recent_view FROM logs WHERE log_type = 'Credential' AND log_action = 'View' AND log_user_id = $session_user_id AND log_entity_id = $credential_id AND log_client_id = $client_id AND log_created_at > (NOW() - INTERVAL 5 MINUTE)"));
|
||||
|
||||
if (intval($check_recent_view['recent_view']) == 0) {
|
||||
logAudit("Credential", "View", "$session_name viewed credential $name", $client_id, $credential_id);
|
||||
}
|
||||
}
|
||||
logAudit("Credential", "View", "$session_name viewed credential $name", $client_i
|
||||
Reference in New Issue
Block a user