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

#3911 Stream: don't allow to stream in the existing stream when 'create stream' permission is off

Alex Trofimov 4 лет назад
Родитель
Сommit
db072bfca6

+ 4 - 0
modules/boonex/stream/classes/BxStrmModule.php

@@ -157,6 +157,10 @@ class BxStrmModule extends BxBaseModTextModule
             return false;
         list($iContentId, $aContentInfo) = $mixedContent;
 
+        $mixedMsg = $this->checkAllowedAdd (false);
+        if ($mixedMsg !== CHECK_ACTION_RESULT_ALLOWED)
+            return MsgBox($mixedMsg);
+
         if ($aContentInfo[$CNF['FIELD_AUTHOR']] !== bx_get_logged_profile_id() && !isAdmin()) 
             return false;
 

+ 4 - 0
modules/boonex/stream/classes/BxStrmTemplate.php

@@ -38,6 +38,10 @@ class BxStrmTemplate extends BxBaseModTextTemplate
         if (!$oEngine->isSreamFromBrowser()) 
             return MsgBox(_t('_bx_stream_from_webcam_not_supported'));
 
+        $mixedMsg = $this->getModule()->checkAllowedAdd (false);
+        if ($mixedMsg !== CHECK_ACTION_RESULT_ALLOWED)
+            return MsgBox($mixedMsg);
+
         $CNF = &$this->getModule()->_oConfig->CNF;
 
         return $this->parseHtmlByName('stream_broadcast_ome.html', array(