Ejemplo n.º 1
0
 public function validateForUpdate($sourceObject, $propertiesToSkip = array())
 {
     if (!PlayReadyPlugin::isAllowedPartner(kCurrentContext::getCurrentPartnerId()) || !PlayReadyPlugin::isAllowedPartner($sourceObject->getPartnerId())) {
         throw new KalturaAPIException(KalturaErrors::PERMISSION_NOT_FOUND, 'Permission not found to use the PlayReady feature.');
     }
     return parent::validateForUpdate($sourceObject, $propertiesToSkip);
 }
Ejemplo n.º 2
0
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     if (!PlayReadyPlugin::isAllowedPartner($this->getPartnerId())) {
         throw new KalturaAPIException(KalturaErrors::SERVICE_FORBIDDEN, $this->serviceName . '->' . $this->actionName);
     }
     $this->applyPartnerFilterForClass('DrmPolicy');
     $this->applyPartnerFilterForClass('DrmProfile');
     $this->applyPartnerFilterForClass('entry');
     $this->applyPartnerFilterForClass('DrmKey');
 }