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