diff --git a/agent/modals/account/account_edit.php b/agent/modals/account/account_edit.php index 30202b77..0957b0a9 100644 --- a/agent/modals/account/account_edit.php +++ b/agent/modals/account/account_edit.php @@ -2,6 +2,8 @@ require_once '../../../includes/modal_header.php'; +enforceUserPermission('module_financial', 2); + $account_id = intval($_GET['id']); $sql = mysqli_query($mysqli, "SELECT * FROM accounts WHERE account_id = $account_id LIMIT 1"); diff --git a/agent/modals/asset/asset_bulk_assign_contact.php b/agent/modals/asset/asset_bulk_assign_contact.php index 3e1d634b..b7d59e3c 100644 --- a/agent/modals/asset/asset_bulk_assign_contact.php +++ b/agent/modals/asset/asset_bulk_assign_contact.php @@ -2,6 +2,8 @@ require_once '../../../includes/modal_header.php'; +enforceUserPermission('module_support', 2); + $client_id = intval($_GET['client_id']); enforceClientAccess(); diff --git a/agent/modals/asset/asset_bulk_assign_location.php b/agent/modals/asset/asset_bulk_assign_location.php index 6714a4ff..37a13e6e 100644 --- a/agent/modals/asset/asset_bulk_assign_location.php +++ b/agent/modals/asset/asset_bulk_assign_location.php @@ -2,6 +2,8 @@ require_once '../../../includes/modal_header.php'; +enforceUserPermission('module_support', 2); + $client_id = intval($_GET['client_id']); enforceClientAccess(); diff --git a/agent/modals/client/client_edit.php b/agent/modals/client/client_edit.php index 4a3e2e7c..0cec4221 100644 --- a/agent/modals/client/client_edit.php +++ b/agent/modals/client/client_edit.php @@ -2,6 +2,8 @@ require_once '../../../includes/modal_header.php'; +enforceUserPermission('module_client', 2); + $client_id = intval($_GET['id']); $sql = mysqli_query($mysqli, "SELECT * FROM clients WHERE client_id = $client_id $access_permission_query LIMIT 1"); diff --git a/agent/modals/contact/contact_bulk_assign_location.php b/agent/modals/contact/contact_bulk_assign_location.php index b1da34de..4b52de6c 100644 --- a/agent/modals/contact/contact_bulk_assign_location.php +++ b/agent/modals/contact/contact_bulk_assign_location.php @@ -2,6 +2,8 @@ require_once '../../../includes/modal_header.php'; +enforceUserPermission('module_client', 2); + $client_id = intval($_GET['client_id']); enforceClientAccess(); diff --git a/agent/modals/document/document_add_from_template.php b/agent/modals/document/document_add_from_template.php index a49e0432..9804619a 100644 --- a/agent/modals/document/document_add_from_template.php +++ b/agent/modals/document/document_add_from_template.php @@ -2,6 +2,8 @@ require_once '../../../includes/modal_header.php'; +enforceUserPermission('module_support', 2); + $client_id = intval($_GET['client_id'] ?? 0); enforceClientAccess(); diff --git a/agent/modals/document/document_bulk_move.php b/agent/modals/document/document_bulk_move.php index ddf5fe84..c1127ba5 100644 --- a/agent/modals/document/document_bulk_move.php +++ b/agent/modals/document/document_bulk_move.php @@ -2,6 +2,8 @@ require_once '../../../includes/modal_header.php'; +enforceUserPermission('module_support', 2); + $client_id = intval($_GET['client_id']); $selected_ids = array_map('intval', $_GET['selected_ids'] ?? []); diff --git a/agent/modals/document/document_move.php b/agent/modals/document/document_move.php index 3171a044..a44e5668 100644 --- a/agent/modals/document/document_move.php +++ b/agent/modals/document/document_move.php @@ -2,6 +2,8 @@ require_once '../../../includes/modal_header.php'; +enforceUserPermission('module_support', 2); + $document_id = intval($_GET['id']); $sql = mysqli_query($mysqli, "SELECT * FROM documents WHERE document_id = $document_id LIMIT 1"); diff --git a/agent/modals/document/document_rename.php b/agent/modals/document/document_rename.php index 2fa66886..9c3ceb7f 100644 --- a/agent/modals/document/document_rename.php +++ b/agent/modals/document/document_rename.php @@ -2,6 +2,8 @@ require_once '../../../includes/modal_header.php'; +enforceUserPermission('module_support', 2); + $document_id = intval($_GET['id']); $sql = mysqli_query($mysqli, "SELECT * FROM documents WHERE document_id = $document_id LIMIT 1"); diff --git a/agent/modals/document/document_version_view.php b/agent/modals/document/document_version_view.php index d935ca20..1d6f74b5 100644 --- a/agent/modals/document/document_version_view.php +++ b/agent/modals/document/document_version_view.php @@ -2,6 +2,8 @@ require_once '../../../includes/modal_header.php'; +enforceUserPermission('module_support'); + // Initialize the HTML Purifier to prevent XSS require_once "../../../libs/htmlpurifier/HTMLPurifier.standalone.php"; diff --git a/agent/modals/document/document_view.php b/agent/modals/document/document_view.php index 95d408eb..12bd3d1d 100644 --- a/agent/modals/document/document_view.php +++ b/agent/modals/document/document_view.php @@ -2,6 +2,8 @@ require_once '../../../includes/modal_header.php'; +enforceUserPermission('module_support'); + // Initialize the HTML Purifier to prevent XSS require_once "../../../libs/htmlpurifier/HTMLPurifier.standalone.php"; diff --git a/agent/modals/expense/expense_edit.php b/agent/modals/expense/expense_edit.php index 9fd3044a..b10d9b69 100644 --- a/agent/modals/expense/expense_edit.php +++ b/agent/modals/expense/expense_edit.php @@ -2,6 +2,8 @@ require_once '../../../includes/modal_header.php'; +enforceUserPermission('module_financial', 2); + $expense_id = intval($_GET['id']); $sql = mysqli_query($mysqli, "SELECT * FROM expenses diff --git a/agent/modals/file/file_move.php b/agent/modals/file/file_move.php index 9ad43155..fbaa84fa 100644 --- a/agent/modals/file/file_move.php +++ b/agent/modals/file/file_move.php @@ -2,6 +2,8 @@ require_once '../../../includes/modal_header.php'; +enforceUserPermission('module_support', 2); + $file_id = intval($_GET['id']); $sql = mysqli_query($mysqli, "SELECT * FROM files WHERE file_id = $file_id LIMIT 1"); diff --git a/agent/modals/file/file_rename.php b/agent/modals/file/file_rename.php index 83303d17..5432acb2 100644 --- a/agent/modals/file/file_rename.php +++ b/agent/modals/file/file_rename.php @@ -1,6 +1,8 @@