Browse Source

#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 years ago
parent
commit
6244228fb3
1 changed files with 4 additions and 0 deletions
  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()
 	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 */);
 		$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
 		// Grant read rights for everything