Bläddra i källkod

Export (legacy): bulk read must be authorized for all the queried classes

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3702 a333f486-631f-4898-b8df-5754b55c2be0
romainq 9 år sedan
förälder
incheckning
09deb1236c
1 ändrade filer med 7 tillägg och 0 borttagningar
  1. 7 0
      webservices/export.php

+ 7 - 0
webservices/export.php

@@ -176,6 +176,13 @@ if (!empty($sExpression))
 			}
 		}
 		$oFilter->SetInternalParams($aArgs);
+		foreach ($oFilter->GetSelectedClasses() as $sAlias => $sClass)
+		{
+			if ((UserRights::IsActionAllowed($sClass, UR_ACTION_BULK_READ) && UR_ALLOWED_YES) == 0)
+			{
+				throw new Exception("The current user does not have permission for exporting data of class $sClass");
+			}
+		}
 
 		if ($oFilter)
 		{