Procházet zdrojové kódy

Ticket #4314 - Spaces: Issue with Join/Leave space actions.

AntonLV před 3 roky
rodič
revize
337a1769ae

+ 11 - 0
modules/base/groups/classes/BxBaseModGroupsConnectionFans.php

@@ -21,10 +21,21 @@ class BxBaseModGroupsConnectionFans extends BxTemplConnection
         $this->_oModule = BxDolModule::getInstance($this->_sModule);
     }
 
+    protected function _checkAllowedConnectInitiator ($oInitiator, $isPerformAction = false)
+    {
+        if(!bx_srv($oInitiator->getModule(), 'act_as_profile'))
+            return CHECK_ACTION_RESULT_ALLOWED;
+
+        return parent::_checkAllowedConnectInitiator($oInitiator, $isPerformAction);
+    }
+
     public function _checkAllowedConnectContent ($oContent)
     {
         $CNF = &$this->_oModule->_oConfig->CNF;
 
+        if(bx_srv($oContent->getModule(), 'act_as_profile'))
+            return CHECK_ACTION_RESULT_ALLOWED;
+
         if(!empty($CNF['OBJECT_PRIVACY_VIEW']) && ($oPrivacy = BxDolPrivacy::getObjectInstance($CNF['OBJECT_PRIVACY_VIEW'])) !== false) {
             $iContentId = $oContent->getContentId();
             $aContentInfo = $this->_oModule->_oDb->getContentInfoById($iContentId);