Customer Portal: exit if 1) there is neither UR nor INC tickets installed 2) the current login has no contact associated to it

SVN:trunk[4060]
This commit is contained in:
Romain Quetiez
2016-05-11 13:18:01 +00:00
parent 1c997a5973
commit c1a4c0185b

View File

@@ -27,6 +27,16 @@ else
}
require_once APPROOT . '/application/startup.inc.php';
if (!class_exists('UserRequest') && !class_exists('Incident'))
{
die('iTop has neither been installed with User Request nor Incident tickets. Please contact your administrator.');
}
if (UserRights::GetContactId() == 0)
{
die(Dict::S('Portal:ErrorNoContactForThisUser'));
}
$sDir = basename(__DIR__);
define('PORTAL_MODULE_ID', $sDir);
define('PORTAL_ID', $sDir);