mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Export: prevent from usage by a non admin (at the page level)
SVN:trunk[3701]
This commit is contained in:
@@ -590,7 +590,7 @@ if (utils::IsModeCLI())
|
||||
}
|
||||
}
|
||||
$oSearch->SetInternalParams($aArgs);
|
||||
|
||||
|
||||
$sFormat = utils::ReadParam('format', 'html', true /* Allow CLI */, 'raw_data');
|
||||
$oExporter = BulkExport::FindExporter($sFormat);
|
||||
if ($oExporter == null)
|
||||
@@ -650,9 +650,6 @@ if (utils::IsModeCLI())
|
||||
try
|
||||
{
|
||||
require_once(APPROOT.'/application/loginwebpage.class.inc.php');
|
||||
LoginWebPage::DoLogin(); // Check user rights and prompt if needed
|
||||
|
||||
ApplicationContext::SetUrlMakerClass('iTopStandardURLMaker');
|
||||
|
||||
// Main parameters
|
||||
$sExpression = utils::ReadParam('expression', null, true /* Allow CLI */, 'raw_data');
|
||||
@@ -661,6 +658,11 @@ try
|
||||
$sFileName = utils::ReadParam('filename', '', true, 'string');
|
||||
$bInteractive = utils::ReadParam('interactive', false);
|
||||
$sMode = utils::ReadParam('mode', '');
|
||||
|
||||
$bMustBeAdmin = $bInteractive;
|
||||
LoginWebPage::DoLogin($bMustBeAdmin); // Check user rights and prompt if needed
|
||||
|
||||
ApplicationContext::SetUrlMakerClass('iTopStandardURLMaker');
|
||||
|
||||
if ($bInteractive)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user