mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
N°2323 - Fix calls to ajax endpoints
(cherry picked from commit c723d19e01)
This commit is contained in:
@@ -51,13 +51,26 @@ try
|
||||
require_once(APPROOT.'/application/user.preferences.class.inc.php');
|
||||
|
||||
require_once(APPROOT.'/application/loginwebpage.class.inc.php');
|
||||
LoginWebPage::DoLoginEx(null /* any portal */, false);
|
||||
$operation = utils::ReadParam('operation', '');
|
||||
|
||||
// Only allow export functions to portal users
|
||||
switch ($operation)
|
||||
{
|
||||
case 'export_build':
|
||||
case 'export_cancel':
|
||||
case 'export_download':
|
||||
$sRequestedPortalId = null;
|
||||
break;
|
||||
|
||||
default:
|
||||
$sRequestedPortalId = (MetaModel::GetConfig()->Get('disable_attachments_download_legacy_portal') === true) ? 'backoffice' : null;
|
||||
}
|
||||
LoginWebPage::DoLoginEx($sRequestedPortalId, false);
|
||||
|
||||
$oPage = new ajax_page("");
|
||||
$oPage->no_cache();
|
||||
|
||||
|
||||
$operation = utils::ReadParam('operation', '');
|
||||
$sFilter = utils::ReadParam('filter', '', false, 'raw_data');
|
||||
$sEncoding = utils::ReadParam('encoding', 'serialize');
|
||||
$sClass = utils::ReadParam('class', 'MissingAjaxParam', false, 'class');
|
||||
|
||||
Reference in New Issue
Block a user