mirror of
https://github.com/itflow-org/itflow
synced 2026-03-01 11:24:52 +00:00
Added logic to the inc_all_client.php file to deny access to users with client access permissions set
This commit is contained in:
@@ -6,14 +6,15 @@ require_once "functions.php";
|
||||
|
||||
require_once "check_login.php";
|
||||
|
||||
require_once "header.php";
|
||||
|
||||
require_once "top_nav.php";
|
||||
|
||||
|
||||
if (isset($_GET['client_id'])) {
|
||||
$client_id = intval($_GET['client_id']);
|
||||
|
||||
// Check to see if the logged in user has permission to access this client (Admins have access to all no matter what perms are set)
|
||||
if(!in_array($client_id, $client_access_array) AND !empty($client_access_string) AND $session_user_role < 3) {
|
||||
echo "You don't have permission to access this client";
|
||||
exit();
|
||||
}
|
||||
|
||||
$sql = mysqli_query($mysqli, "UPDATE clients SET client_accessed_at = NOW() WHERE client_id = $client_id");
|
||||
|
||||
$sql = mysqli_query(
|
||||
@@ -231,6 +232,10 @@ if (isset($_GET['client_id'])) {
|
||||
}
|
||||
}
|
||||
|
||||
require_once "header.php";
|
||||
|
||||
require_once "top_nav.php";
|
||||
|
||||
require_once "client_side_nav.php";
|
||||
|
||||
require_once "inc_wrapper.php";
|
||||
|
||||
Reference in New Issue
Block a user