mirror of
https://github.com/itflow-org/itflow
synced 2026-03-03 04:14:54 +00:00
Prevent deletion of client unless user role is 3 (admin)
This commit is contained in:
7
post.php
7
post.php
@@ -1226,6 +1226,13 @@ if(isset($_POST['edit_client'])){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['delete_client'])){
|
if(isset($_GET['delete_client'])){
|
||||||
|
if($session_user_role !== "3"){
|
||||||
|
$_SESSION['alert_type'] = "danger";
|
||||||
|
$_SESSION['alert_message'] = "You are not permitted to do that!";
|
||||||
|
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
$client_id = intval($_GET['delete_client']);
|
$client_id = intval($_GET['delete_client']);
|
||||||
|
|
||||||
//Get Client Name
|
//Get Client Name
|
||||||
|
|||||||
Reference in New Issue
Block a user