Procházet zdrojové kódy

JSON/REST: When specifying a case log entry (or the whole), it was not possible to set the user name without knowing a valid user id

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3593 a333f486-631f-4898-b8df-5754b55c2be0
romainq před 10 roky
rodič
revize
a3ac3a60ff
1 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. 3 3
      core/ormcaselog.class.inc.php

+ 3 - 3
core/ormcaselog.class.inc.php

@@ -1,5 +1,5 @@
 <?php
-// Copyright (C) 2010-2012 Combodo SARL
+// Copyright (C) 2010-2015 Combodo SARL
 //
 //   This file is part of iTop.
 //
@@ -23,7 +23,7 @@ define('CASELOG_SEPARATOR', "\n".'========== %1$s : %2$s (%3$d) ============'."\
 /**
  * Class to store a "case log" in a structured way, keeping track of its successive entries
  *  
- * @copyright   Copyright (C) 2010-2012 Combodo SARL
+ * @copyright   Copyright (C) 2010-2015 Combodo SARL
  * @license     http://opensource.org/licenses/AGPL-3.0
  */
 class ormCaseLog {
@@ -394,7 +394,7 @@ class ormCaseLog {
 			{
 				throw new Exception("Only administrators can set the user id", RestResult::UNAUTHORIZED);
 			}
-			if ($bCheckUserId)
+			if ($bCheckUserId && ($oJson->user_id != 0))
 			{
 				try
 				{