protected function unimpersonate() { $clientConfig = $this->client->getConfig(); $clientConfig->partnerId = $this->batchPartnerId; $this->client->setConfig($clientConfig); }
$storage_base_dir = $argv[8]; $delivery_url = $argv[9]; $username = $argv[10]; $passwd = $argv[11]; $storage_type = $argv[12]; $config = new KalturaConfiguration($partner_id); $config->serviceUrl = $service_url; $client = new KalturaClient($config); $user_id = null; $expiry = null; $privileges = null; $type = KalturaSessionType::ADMIN; $ks = $client->user->login(-2, $minus2_mail, $minus2_passwd, $expiry, $privileges); $client->setKs($ks); $config->partnerId = $partner_id; $client->setConfig($config); if ($storage_type == S3) { $storageProfile = new KalturaAmazonS3StorageProfile(); $storageProfile->filesPermissionInS3 = KalturaAmazonS3StorageProfileFilesPermissionLevel::ACL_PUBLIC_READ; } else { $storageProfile = new KalturaStorageProfile(); } $storageProfile->name = $storage_display_name; $storageProfile->systemName = $storage_display_name; $storageProfile->desciption = $storage_display_name . ' - auto generated by ' . __FILE__ . "\n"; $storageProfile->pathManagerClass = 'kPathManager'; $storageProfile->status = KalturaStorageProfileStatus::AUTOMATIC; $storageProfile->protocol = $protocols[$protocol]; $storageProfile->storageUrl = $storage_url; $storageProfile->storageBaseDir = $storage_base_dir; $storageProfile->storageUsername = $username;
public function impersonate($partnerId) { $config = $this->kalturaClient->getConfig(); $config->partnerId = $partnerId; $this->kalturaClient->setConfig($config); }
public function unimpersonate() { $this->kClientConfig->partnerId = $this->taskConfig->getPartnerId(); $this->kClient->setConfig($this->kClientConfig); }