Fix: disable the connection to iTopHub when running in demo mode (restore 2018-04-10 revisions : r5634)

SVN:trunk[5631]
This commit is contained in:
Pierre Goiffon
2018-04-12 08:53:20 +00:00
parent c562098ef7
commit 757130847f
3 changed files with 64 additions and 32 deletions

View File

@@ -279,6 +279,7 @@ try
require_once(APPROOT.'/application/loginwebpage.class.inc.php');
LoginWebPage::DoLoginEx(null, true /* $bMustBeAdmin */); // Check user rights and prompt if needed
if (MetaModel::GetConfig()->Get('demo_mode')) throw new Exception('Sorry the installation of extensions is not allowed in demo mode');
$oPage = new SetupPage(''); // Title will be set later, depending on $sOperation
$oPage->add_linked_script(utils::GetAbsoluteUrlModulesRoot().'itop-hub-connector/js/hub.js');