コード例 #1
0
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     if (!DrmPlugin::isAllowedPartner(kCurrentContext::$ks_partner_id)) {
         throw new KalturaAPIException(KalturaErrors::FEATURE_FORBIDDEN, DrmPlugin::PLUGIN_NAME);
     }
 }
コード例 #2
0
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     if (!AdminConsolePlugin::isAllowedPartner($this->getPartnerId())) {
         throw new KalturaAPIException(KalturaErrors::SERVICE_FORBIDDEN, $this->serviceName . '->' . $this->actionName);
     }
 }
コード例 #3
0
ファイル: ReportService.php プロジェクト: DBezemer/server
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     if (in_array(strtolower($actionName), array('execute', 'getcsv'), true)) {
         $this->applyPartnerFilterForClass('Report');
     }
 }
 protected function partnerRequired($actionName)
 {
     if ($actionName === 'getCurrentPermissions') {
         return false;
     }
     return parent::partnerRequired($actionName);
 }
 protected function partnerRequired($actionName)
 {
     if ($actionName === 'register') {
         return false;
     }
     return parent::partnerRequired($actionName);
 }
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     if ($this->getPartnerId() != Partner::BATCH_PARTNER_ID && $this->getPartnerId() != Partner::ADMIN_CONSOLE_PARTNER_ID) {
         throw new KalturaAPIException(KalturaErrors::SERVICE_FORBIDDEN, $this->serviceName . '->' . $this->actionName);
     }
 }
コード例 #7
0
ファイル: CategoryService.php プロジェクト: dozernz/server
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     if ($actionName == 'add') {
         categoryPeer::setIgnoreDeleted(true);
     }
 }
コード例 #8
0
 protected function globalPartnerAllowed($actionName)
 {
     if ($actionName === 'getFlavorAssetsWithParams') {
         return true;
     }
     return parent::globalPartnerAllowed($actionName);
 }
 protected function partnerRequired($actionName)
 {
     if ($actionName === 'startWidgetSession') {
         return false;
     }
     return parent::partnerRequired($actionName);
 }
コード例 #10
0
ファイル: SystemService.php プロジェクト: DBezemer/server
 protected function partnerRequired($actionName)
 {
     if ($actionName == 'ping' || $actionName == 'getTime') {
         return false;
     }
     return parent::partnerRequired($actionName);
 }
コード例 #11
0
ファイル: QuizService.php プロジェクト: ace3535/server
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     if (!QuizPlugin::isAllowedPartner($this->getPartnerId())) {
         throw new KalturaAPIException(KalturaErrors::FEATURE_FORBIDDEN, QuizPlugin::PLUGIN_NAME);
     }
 }
コード例 #12
0
 /**
  * @ignore
  */
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     if ($this->getPartnerId() != Partner::ADMIN_CONSOLE_PARTNER_ID) {
         parent::applyPartnerFilterForClass(new BatchJobPeer());
     }
 }
コード例 #13
0
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     parent::applyPartnerFilterForClass(new assetPeer());
     if (!AsperaPlugin::isAllowedPartner($this->getPartnerId())) {
         throw new KalturaAPIException(KalturaErrors::SERVICE_FORBIDDEN, $this->serviceName . '->' . $this->actionName);
     }
 }
コード例 #14
0
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     $this->applyPartnerFilterForClass('GenericDistributionProvider');
     if (!ContentDistributionPlugin::isAllowedPartner($this->getPartnerId())) {
         throw new KalturaAPIException(KalturaErrors::FEATURE_FORBIDDEN, ContentDistributionPlugin::PLUGIN_NAME);
     }
 }
コード例 #15
0
ファイル: DrmProfileService.php プロジェクト: DBezemer/server
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     $this->applyPartnerFilterForClass('DrmProfile');
     if (!DrmPlugin::isAllowedPartner($this->getPartnerId())) {
         throw new KalturaAPIException(KalturaErrors::FEATURE_FORBIDDEN, DrmPlugin::PLUGIN_NAME);
     }
 }
コード例 #16
0
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     if (in_array(strtolower($actionName), array('execute', 'getcsv'), true)) {
         $partnerGroup = $this->partnerGroup . ',0';
         parent::applyPartnerFilterForClass(new ReportPeer(), $partnerGroup);
     }
 }
コード例 #17
0
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     myPartnerUtils::addPartnerToCriteria(new GenericDistributionProviderActionPeer(), $this->getPartnerId(), $this->private_partner_data, $this->partnerGroup());
     if (!ContentDistributionPlugin::isAllowedPartner(kCurrentContext::$master_partner_id)) {
         throw new KalturaAPIException(KalturaErrors::SERVICE_FORBIDDEN, $this->serviceName . '->' . $this->actionName);
     }
 }
コード例 #18
0
 protected function partnerGroup($peer = null)
 {
     if ($this->actionName == 'add' || $this->actionName == 'update') {
         assetParamsPeer::setIsDefaultInDefaultCriteria(false);
         return $this->partnerGroup . ',0';
     }
     return parent::partnerGroup();
 }
コード例 #19
0
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     //Don;t apply partner filter if action is list to avoid returning default partner 0 response profiles on every call
     if ($actionName !== "list") {
         $this->applyPartnerFilterForClass('ResponseProfile');
     }
 }
コード例 #20
0
ファイル: MetadataService.php プロジェクト: DBezemer/server
 protected function kalturaNetworkAllowed($actionName)
 {
     if ($actionName == 'list') {
         $this->partnerGroup .= ',0';
         return true;
     }
     return parent::kalturaNetworkAllowed($actionName);
 }
コード例 #21
0
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     $this->applyPartnerFilterForClass('LiveChannelSegment');
     if (!PermissionPeer::isValidForPartner(PermissionName::FEATURE_LIVE_CHANNEL, $this->getPartnerId())) {
         throw new KalturaAPIException(KalturaErrors::SERVICE_FORBIDDEN, $this->serviceName . '->' . $this->actionName);
     }
 }
コード例 #22
0
ファイル: ShortLinkService.php プロジェクト: DBezemer/server
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     if ($actionName != 'goto') {
         $this->applyPartnerFilterForClass('ShortLink');
         $this->applyPartnerFilterForClass('kuser');
     }
 }
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     if ($actionName != 'goto') {
         myPartnerUtils::addPartnerToCriteria(new ShortLinkPeer(), $this->getPartnerId(), $this->private_partner_data, $this->partnerGroup());
         myPartnerUtils::addPartnerToCriteria(new kuserPeer(), $this->getPartnerId(), $this->private_partner_data, $this->partnerGroup());
     }
 }
コード例 #24
0
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     if ($this->getPartnerId() != Partner::BATCH_PARTNER_ID) {
         throw new KalturaAPIException(KalturaErrors::SERVICE_FORBIDDEN, $this->serviceName . '->' . $this->actionName);
     }
     myPartnerUtils::resetAllFilters();
 }
コード例 #25
0
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     $partnerId = $this->getPartnerId();
     if (!EventNotificationPlugin::isAllowedPartner($partnerId)) {
         throw new KalturaAPIException(KalturaErrors::FEATURE_FORBIDDEN, EventNotificationPlugin::PLUGIN_NAME);
     }
     $this->applyPartnerFilterForClass('EventNotificationTemplate');
 }
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     if (!DropFolderPlugin::isAllowedPartner($this->getPartnerId())) {
         throw new KalturaAPIException(KalturaErrors::SERVICE_FORBIDDEN, $this->serviceName . '->' . $this->actionName);
     }
     myPartnerUtils::addPartnerToCriteria(new DropFolderPeer(), $this->getPartnerId(), $this->private_partner_data, $this->partnerGroup());
     myPartnerUtils::addPartnerToCriteria(new DropFolderFilePeer(), $this->getPartnerId(), $this->private_partner_data, $this->partnerGroup());
 }
コード例 #27
0
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     // since plugin might be using KS impersonation, we need to validate the requesting
     // partnerId from the KS and not with the $_POST one
     if (!AdminConsolePlugin::isAllowedPartner($this->getPartnerId())) {
         throw new KalturaAPIException(KalturaErrors::SERVICE_FORBIDDEN, $this->serviceName . '->' . $this->actionName);
     }
 }
コード例 #28
0
ファイル: ServerNodeService.php プロジェクト: DBezemer/server
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     $partnerId = $this->getPartnerId();
     if (!$this->getPartner()->getEnabledService(PermissionName::FEATURE_SERVER_NODE)) {
         throw new KalturaAPIException(KalturaErrors::SERVICE_FORBIDDEN, $this->serviceName . '->' . $this->actionName);
     }
     $this->applyPartnerFilterForClass('serverNode');
 }
コード例 #29
0
ファイル: FileSyncService.php プロジェクト: AdiTal/server
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     // since plugin might be using KS impersonation, we need to validate the requesting
     // partnerId from the KS and not with the $_POST one
     if (!FileSyncPlugin::isAllowedPartner($this->getPartnerId())) {
         throw new KalturaAPIException(KalturaErrors::FEATURE_FORBIDDEN, FileSyncPlugin::PLUGIN_NAME);
     }
 }
コード例 #30
0
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     parent::applyPartnerFilterForClass(flavorAssetPeer::getInstance());
     parent::applyPartnerFilterForClass(flavorParamsPeer::getInstance());
     parent::applyPartnerFilterForClass(flavorParamsOutputPeer::getInstance());
     parent::applyPartnerFilterForClass(new entryPeer());
     parent::applyPartnerFilterForClass(new syndicationFeedPeer());
 }