Hello,
We have plans to add option to enable Print and Export permissions to be set by the administrator. Unfortunately, this functionality will not make it to 1.3, it will arrive some time later.
Right now the best I can offer is to modify modules/Utils/RecordBrowser/RecordBrowser_0.php, find the code:
if (!$this->disabled['pdf'] && !$pdf && $this->amount_of_records<200 && Base_AclCommon::i_am_admin()) {
$key = md5(serialize($this->tab).serialize($crits).serialize($cols).serialize($order).serialize($admin));
Base_ActionBarCommon::add('print', 'Print', 'href="modules/Utils/RecordBrowser/print.php?'.http_build_query(array('key'=>$key, 'cid'=>CID)).'" target="_blank"');
$_SESSION['client']['utils_recordbrowser'][$key] = array(
'tab'=>$this->tab,
'crits'=>$crits,
'cols'=>$cols,
'order'=>$order,
'admin'=>$admin,
'more_table_properties'=>$this->more_table_properties
);
}
if ($pdf) $limit = null;
else $limit = $gb->get_limit($this->amount_of_records);
$records = Utils_RecordBrowserCommon::get_records($this->tab, $crits, array(), $order, $limit, $admin);
if ((Base_AclCommon::i_am_admin() && $this->fullscreen_table) || $this->enable_export)
Base_ActionBarCommon::add('save','Export', 'href="modules/Utils/RecordBrowser/csv_export.php?'.http_build_query(array('tab'=>$this->tab, 'admin'=>$admin, 'cid'=>CID, 'path'=>$this->get_path())).'"');
and remove Base_AclCommon::i_am_admin() from the conditions, like this (2 occurances):
if (!$this->disabled['pdf'] && !$pdf && $this->amount_of_records<200) {
$key = md5(serialize($this->tab).serialize($crits).serialize($cols).serialize($order).serialize($admin));
Base_ActionBarCommon::add('print', 'Print', 'href="modules/Utils/RecordBrowser/print.php?'.http_build_query(array('key'=>$key, 'cid'=>CID)).'" target="_blank"');
$_SESSION['client']['utils_recordbrowser'][$key] = array(
'tab'=>$this->tab,
'crits'=>$crits,
'cols'=>$cols,
'order'=>$order,
'admin'=>$admin,
'more_table_properties'=>$this->more_table_properties
);
}
if ($pdf) $limit = null;
else $limit = $gb->get_limit($this->amount_of_records);
$records = Utils_RecordBrowserCommon::get_records($this->tab, $crits, array(), $order, $limit, $admin);
if (($this->fullscreen_table) || $this->enable_export)
Base_ActionBarCommon::add('save','Export', 'href="modules/Utils/RecordBrowser/csv_export.php?'.http_build_query(array('tab'=>$this->tab, 'admin'=>$admin, 'cid'=>CID, 'path'=>$this->get_path())).'"');
You will also have to edit modules/Utils/RecordBrowser/csv_export.php, replace the code:
if (!Base_AclCommon::i_am_admin())
die('Invalid usage - access denied');
with the code
if (!Acl::is_user())
die('Invalid usage - access denied');
This should do the trick.
As I said, in the future administrators can decide who can Print and who can Export data using interface included in EPESI.
Kind regards,
Arek