Explorar o código

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 %!s(int64=14) %!d(string=hai) anos
pai
achega
184485bf14
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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)