Просмотр исходного кода

Ticket #3947 - Credits: Issue with Bundle owhership.

AntonLV 4 лет назад
Родитель
Сommit
4e71ff827b
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      modules/boonex/credits/classes/BxCreditsModule.php

+ 4 - 1
modules/boonex/credits/classes/BxCreditsModule.php

@@ -440,11 +440,14 @@ class BxCreditsModule extends BxBaseModGeneralModule
     /** 
      * @ref bx_credits-get_cart_items "get_cart_items"
      */
-    public function serviceGetCartItems($iAuthorId)
+    public function serviceGetCartItems($iSellerId)
     {
     	$CNF = &$this->_oConfig->CNF;
 
         $iAuthorId = $this->_oConfig->getAuthor();
+        if($iSellerId != $iAuthorId && !BxDolAcl::getInstance()->isMemberLevelInSet([MEMBERSHIP_ID_ADMINISTRATOR], $iSellerId))
+            return array();
+
         $aItems = $this->_oDb->getBundle(array('type' => 'all', 'active' => 1));
 
         $aResult = array();