Posted by Kishore
2017-12-01

Hi,
is there a option to block staff to add/delete contacts
Posted by Tom
2017-12-03

Hi,

>is there a option to block staff to add/delete contacts

To disable deleting for non-administrator, first you need to disable the backend code for deletion. open web/staff/app/cls_ps_(--table-name--).inc.php and add
if ( !$this->sys->IsAdmin() ) exit;
after
case 'del_multi':
The result should look like:
case 'del_multi': if ( !$this->sys->IsAdmin() ) exit;
Log in to the admin panel as a non-administrator and try to delete records. You should get a blank page. Next, hide the delete button from non-administrators in the template. The path of the template is web/staff/tpl.(table-name).search.inc.php. To hide it from non-administrators, use this code:
<?php if ( $sys->IsAdmin() ) {
//code to hide from non-admin
} ?>