Преглед изворни кода

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

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4060 a333f486-631f-4898-b8df-5754b55c2be0
romainq пре 9 година
родитељ
комит
31f9d9c91c
1 измењених фајлова са 10 додато и 0 уклоњено
  1. 10 0
      datamodels/2.x/itop-portal/index.php

+ 10 - 0
datamodels/2.x/itop-portal/index.php

@@ -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);