Posted by Tom
2014-07-29
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 and try to delete records. You should get a blank page. Next, remove or hide the delete button from the template. The path of the template is web/staff/tpl.(table-name).search.inc.php.
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 and try to delete records. You should get a blank page. Next, remove or hide the delete button from the template. The path of the template is web/staff/tpl.(table-name).search.inc.php.
I do not want to display the DELETE button on the search page only for members of staff.
But I want the button to appear for administrators ...
How?
thank you