Przeglądaj źródła

Protect against a multiple stimulus on a set based on an abstract class.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1332 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 14 lat temu
rodzic
commit
184485bf14
1 zmienionych plików z 2 dodań i 0 usunięć
  1. 2 0
      core/userrights.class.inc.php

+ 2 - 0
core/userrights.class.inc.php

@@ -905,6 +905,8 @@ class StimulusChecker extends ActionChecker
 	public function IsAllowed()
 	{
 		$sClass = $this->oFilter->GetClass();
+		if (MetaModel::IsAbstract($sClass)) return UR_ALLOWED_NO; // Safeguard, not implemented if the base class of the set is abstract !
+		
 		$oSet = new DBObjectSet($this->oFilter);
 		$iActionAllowed = UserRights::IsStimulusAllowed($sClass,  $this->iActionCode, $oSet);
 		if ($iActionAllowed == UR_ALLOWED_NO)