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'); $config = config::read('phpgwapi');
if($config['export_limit'] !== 'no') if($GLOBALS['egw_info']['user']['apps']['admin'] || $config['export_limit'] !== 'no')
{ {
$file[] = array( $file[] = array(
'text' => 'Export', 'text' => 'Export',

View File

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

View File

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