浏览代码

#405 Could not install without the module 'User Request Management'

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1269 a333f486-631f-4898-b8df-5754b55c2be0
romainq 14 年之前
父节点
当前提交
6244228fb3
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      modules/itop-profiles-itil/module.itop-profiles-itil.php

+ 4 - 0
modules/itop-profiles-itil/module.itop-profiles-itil.php

@@ -200,6 +200,10 @@ class CreateITILProfilesInstaller extends ModuleInstallerAPI
 	*/	
 	public static function DoCreateUserPortalProfile()
 	{
+		// Do not attempt to create this profile if the module 'User Request Management' is not installed
+		// Note: ideally, the creation of this profile should be moved to the 'User Request Management' module
+		if (!MetaModel::IsValidClass('UserRequest')) return;
+
 		$iNewId =  URP_Profiles::DoCreateProfile(PORTAL_PROFILE_NAME, 'Has the rights to access to the user portal. People having this profile will not be allowed to access the standard application, they will be automatically redirected to the user portal.', true /* reserved name */);
 		
 		// Grant read rights for everything