Page 1 of 1

Non-Admin will not be able to delete ticket

Posted: Thu Feb 28, 2008 5:54 am
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>

Posted: Thu Feb 28, 2008 9:46 am
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).