mirror of https://github.com/itflow-org/itflow
Prevent deletion of client unless user role is 3 (admin)
This commit is contained in:
parent
fd589c53fa
commit
e4d2d0c699
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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue