Exemplo n.º 1
0
 private static function createDefaultAccessControl($partnerId, $defaultPolicy)
 {
     $accessControlProfile = new accessControl();
     $accessControlProfile->setDescription('DRM default access control');
     $accessControlProfile->setName('drm_default_' . $partnerId);
     $accessControlProfile->setPartnerId($partnerId);
     $accessControlProfile->setSystemName('drm_default_' . $partnerId);
     $ruleDefault = self::addAccessControlRule($defaultPolicy->getId());
     $accessControlProfile->setRulesArray(array($ruleDefault));
     $accessControlProfile->save();
     KalturaLog::debug("Access control profile id:" . $accessControlProfile->getId());
 }
Exemplo n.º 2
0
 private static function createDefaultAccessControl($partnerId, $defaultPolicy, $rentalPolicy, $purchasePolicy, $subscriptionPolicy)
 {
     $accessControlProfile = new accessControl();
     $accessControlProfile->setDescription('Play Ready default access control');
     $accessControlProfile->setName('play_ready_default_' . $partnerId);
     $accessControlProfile->setPartnerId($partnerId);
     $accessControlProfile->setSystemName('play_ready_default_' . $partnerId);
     $rulePurchase = self::addAccessControlRule('scenario_purchase', $purchasePolicy->getId());
     $ruleRental = self::addAccessControlRule('scenario_rental', $rentalPolicy->getId());
     $ruleDefault = self::addAccessControlRule('scenario_default', $defaultPolicy->getId());
     $ruleSubscription = self::addAccessControlRule('scenario_subscription', $subscriptionPolicy->getId());
     $accessControlProfile->setRulesArray(array($rulePurchase, $ruleRental, $ruleDefault, $ruleSubscription));
     $accessControlProfile->save();
     KalturaLog::debug("Access control profile id:" . $accessControlProfile->getId());
 }