Don't hide exports from admins, even if exporting is disabled for users.

This commit is contained in:
Nathan Gray 2011-02-24 15:47:43 +00:00
parent 002bb81b48
commit 398185f525
3 changed files with 10 additions and 8 deletions

View File

@ -33,7 +33,7 @@ class importexport_admin_prefs_sidebox_hooks
),
);
$config = config::read('phpgwapi');
if($config['export_limit'] !== 'no')
if($GLOBALS['egw_info']['user']['apps']['admin'] || $config['export_limit'] !== 'no')
{
$file[] = array(
'text' => 'Export',

View File

@ -86,10 +86,10 @@ class importexport_definitions_ui
} else {
// Filter private definitions
$filter['owner'] = $GLOBALS['egw_info']['user']['account_id'];
}
$config = config::read('phpgwapi');
if($config['export_limit'] == 'no') {
$filter['type'] = 'import';
$config = config::read('phpgwapi');
if($config['export_limit'] == 'no') {
$filter['type'] = 'import';
}
}
$bodefinitions = new importexport_definitions_bo($filter, true);

View File

@ -49,9 +49,11 @@ class importexport_export_ui {
$preserv = array();
// Check global setting
$config = config::read('phpgwapi');
if($config['export_limit'] == 'no') {
die(lang('Admin disabled exporting'));
if(!$GLOBALS['egw_info']['user']['apps']['admin']) {
$config = config::read('phpgwapi');
if($config['export_limit'] == 'no') {
die(lang('Admin disabled exporting'));
}
}
$et = new etemplate(self::_appname. '.export_dialog');