From e6a314d2332310fafea0f73728f4f33978b02f00 Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Sun, 27 Mar 2022 15:32:40 +0100 Subject: [PATCH] Prevent tech/accountant from performing certain tasks as per access matrix --- client.php | 30 ++- client_assets.php | 8 +- client_certificates.php | 6 +- client_contacts.php | 10 +- client_documents.php | 6 +- client_domains.php | 6 +- client_logins.php | 4 +- client_networks.php | 6 +- client_services.php | 6 +- client_software.php | 6 +- client_tickets.php | 6 +- client_vendors.php | 6 +- clients.php | 48 ++-- inc_all_admin.php | 8 + post.php | 574 +++++++++++++++++++++++++++++++++++++++- side_nav.php | 4 +- ticket.php | 12 +- tickets.php | 8 +- 18 files changed, 678 insertions(+), 76 deletions(-) diff --git a/client.php b/client.php index 76139efa..e04cbcc0 100644 --- a/client.php +++ b/client.php @@ -235,7 +235,7 @@ $location_phone = formatPhoneNumber($location_phone); } ?> - 2){ ?> +

Billing

Paid
@@ -248,20 +248,22 @@ $location_phone = formatPhoneNumber($location_phone);
Open Tickets
-
diff --git a/client_assets.php b/client_assets.php index 87992935..0fead289 100644 --- a/client_assets.php +++ b/client_assets.php @@ -346,10 +346,12 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); Edit Copy 0){ ?> - Tickets () + Tickets () + + + + Delete - - Delete diff --git a/client_certificates.php b/client_certificates.php index df820aa0..19f00f85 100644 --- a/client_certificates.php +++ b/client_certificates.php @@ -112,8 +112,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); diff --git a/client_contacts.php b/client_contacts.php index 680d148e..b883b1e4 100644 --- a/client_contacts.php +++ b/client_contacts.php @@ -219,10 +219,12 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); diff --git a/client_documents.php b/client_documents.php index bbe50682..86afb59f 100644 --- a/client_documents.php +++ b/client_documents.php @@ -179,8 +179,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); diff --git a/client_domains.php b/client_domains.php index 94b7d38c..3ddd7dc3 100644 --- a/client_domains.php +++ b/client_domains.php @@ -124,8 +124,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); diff --git a/client_logins.php b/client_logins.php index 1db58013..477e45be 100644 --- a/client_logins.php +++ b/client_logins.php @@ -148,8 +148,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); diff --git a/client_networks.php b/client_networks.php index dbf9218a..4e599a46 100644 --- a/client_networks.php +++ b/client_networks.php @@ -138,8 +138,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); diff --git a/client_services.php b/client_services.php index d72b405e..e137baf1 100644 --- a/client_services.php +++ b/client_services.php @@ -91,8 +91,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); diff --git a/client_software.php b/client_software.php index 75ac57f8..740b6bbc 100644 --- a/client_software.php +++ b/client_software.php @@ -186,8 +186,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); diff --git a/client_tickets.php b/client_tickets.php index a5f58320..534df573 100644 --- a/client_tickets.php +++ b/client_tickets.php @@ -191,8 +191,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); diff --git a/client_vendors.php b/client_vendors.php index 7e0cb211..ae9dcfab 100644 --- a/client_vendors.php +++ b/client_vendors.php @@ -175,8 +175,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); diff --git a/clients.php b/clients.php index 5de1d043..47fbf741 100644 --- a/clients.php +++ b/clients.php @@ -107,7 +107,9 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));

Clients

- + + +
@@ -165,8 +167,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); Name Address Contact - Billing - Action + Billing + Action @@ -306,23 +308,31 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); } ?> - - Balance -
- Paid - - - @@ -325,8 +327,10 @@ if(isset($_GET['ticket_id'])){ diff --git a/tickets.php b/tickets.php index 58ff9247..a2a2c3f9 100644 --- a/tickets.php +++ b/tickets.php @@ -434,9 +434,11 @@ $user_active_assigned_tickets = $row['total_tickets_assigned'];