Non-Admin will not be able to delete ticket

Everything related to Hesk - helpdesk software

Moderator: mkoch227

Post Reply
robchuah
Posts: 2
Joined: Thu Feb 28, 2008 5:38 am

Non-Admin will not be able to delete ticket

Post by robchuah »

/*************************************
Title: Non-Admin will not be able to delete
Version: 0.94.1
Author:
Demo:
Download:
Website:

Short description:

This is a very simple hack to remove the option for non-admin to delete ticket.

*************************************/

(Here below you can write additional info, longer description and comments)

Replace line 203 till 206 of the file inc/print_tickets.inc.php

Original

Code: Select all

<p align="center"><select name="a">
<option value="delete" selected><?php echo $hesklang['del_selected']; ?></option>
<option value="close"><?php echo $hesklang['close_selected']; ?></option>
</select>
Modified

Code: Select all

<p align="center"><select name="a">
<?php
if (!empty($_SESSION['isadmin']))
{
?>
<option value="delete" selected><?php echo $hesklang['del_selected']; ?></option>
<?php
}
?>
<option value="close"><?php echo $hesklang['close_selected']; ?></option>
</select>
Klemen
Site Admin
Posts: 10135
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Thanks for sharing.

FYI: for the next version I have planned to be able to give staff more precise defined permissions. Instead of administrator/normal staff now you will be able to give exact permissions to each staff member (what he/she is allowed and what not).
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply