public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     myPartnerUtils::addPartnerToCriteria(new CuePointPeer(), $this->getPartnerId(), $this->private_partner_data, $this->partnerGroup());
     // when session is not admin, allow access to user entries only
     if (!$this->getKs() || !$this->getKs()->isAdmin()) {
         CuePointPeer::setDefaultCriteriaFilterByKuser();
     }
     if (!CuePointPlugin::isAllowedPartner($this->getPartnerId())) {
         throw new KalturaAPIException(KalturaErrors::SERVICE_FORBIDDEN, $this->serviceName . '->' . $this->actionName);
     }
 }
示例#2
0
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     $this->applyPartnerFilterForClass('CuePoint');
     // when session is not admin, allow access to user entries only
     if (!$this->getKs() || !$this->getKs()->isAdmin()) {
         KalturaCriterion::enableTag(KalturaCriterion::TAG_USER_SESSION);
         CuePointPeer::setUserContentOnly(true);
     }
     if (!CuePointPlugin::isAllowedPartner($this->getPartnerId())) {
         throw new KalturaAPIException(KalturaErrors::FEATURE_FORBIDDEN, CuePointPlugin::PLUGIN_NAME);
     }
     if (!$this->getPartner()->getEnabledService(PermissionName::FEATURE_KALTURA_LIVE_STREAM)) {
         throw new KalturaAPIException(KalturaErrors::FEATURE_FORBIDDEN, 'Kaltura Live Streams');
     }
 }
示例#3
0
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     // Play-Server and Media-Server list entries of all partners
     // This is not too expensive as the requests are cached conditionally and performed on sphinx
     $allowedSystemPartners = array(Partner::MEDIA_SERVER_PARTNER_ID, Partner::PLAY_SERVER_PARTNER_ID);
     if (in_array($this->getPartnerId(), $allowedSystemPartners) && $actionName == 'list') {
         myPartnerUtils::resetPartnerFilter('entry');
     } else {
         $this->applyPartnerFilterForClass('CuePoint');
     }
     // when session is not admin, allow access to user entries only
     if (!$this->getKs() || !$this->getKs()->isAdmin()) {
         KalturaCriterion::enableTag(KalturaCriterion::TAG_USER_SESSION);
         CuePointPeer::setUserContentOnly(true);
     }
     if (!CuePointPlugin::isAllowedPartner($this->getPartnerId())) {
         throw new KalturaAPIException(KalturaErrors::FEATURE_FORBIDDEN, CuePointPlugin::PLUGIN_NAME);
     }
 }