当前位置: 首页>>代码示例>>PHP>>正文


PHP entry::getAccessControl方法代码示例

本文整理汇总了PHP中entry::getAccessControl方法的典型用法代码示例。如果您正苦于以下问题:PHP entry::getAccessControl方法的具体用法?PHP entry::getAccessControl怎么用?PHP entry::getAccessControl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在entry的用法示例。


在下文中一共展示了entry::getAccessControl方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: validateAccessControl

 public function validateAccessControl()
 {
     $accessControl = $this->entry->getAccessControl();
     if (!$accessControl) {
         return;
     }
     $context = new kEntryContextDataResult();
     $scope = $this->getAccessControlScope();
     if (!$this->isKsAdmin()) {
         $this->disableCache = $accessControl->applyContext($context, $scope);
     } else {
         $this->disableCache = false;
     }
     if (count($context->getAccessControlMessages())) {
         foreach ($context->getAccessControlMessages() as $msg) {
             header("X-Kaltura: access-control: {$msg}");
         }
     }
     if (count($context->getAccessControlActions())) {
         $actions = $context->getAccessControlActions();
         foreach ($actions as $action) {
             /* @var $action kAccessControlAction */
             if ($action->getType() == accessControlActionType::BLOCK) {
                 KExternalErrors::dieError(KExternalErrors::ACCESS_CONTROL_RESTRICTED);
             }
         }
     }
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:28,代码来源:KSecureEntryHelper.class.php

示例2: validateAccessControl

 protected function validateAccessControl()
 {
     $accessControl = $this->_entry->getAccessControl();
     if ($accessControl) {
         $accessControlScope = $this->getAccessControlScope();
         $accessControl->setScope($accessControlScope);
         if (!$accessControl->isValid()) {
             KExternalErrors::dieError(KExternalErrors::ACCESS_CONTROL_RESTRICTED);
         }
     }
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:11,代码来源:KSecureEntryHelper.class.php

示例3: applyContext

 protected function applyContext()
 {
     $this->contextResult = null;
     $accessControl = $this->entry->getAccessControl();
     if (!$accessControl) {
         return;
     }
     $this->contextResult = new kEntryContextDataResult();
     $scope = $this->getAccessControlScope();
     if (!$this->isKsAdmin()) {
         $this->disableCache = $accessControl->applyContext($this->contextResult, $scope);
     } else {
         $this->disableCache = false;
     }
     if (count($this->contextResult->getActions())) {
         foreach ($this->contextResult->getActions() as $action) {
             if (!isset($this->actionLists[$action->getType()])) {
                 $this->actionLists[$action->getType()] = array($action);
             } else {
                 array_push($this->actionLists[$action->getType()], $action);
             }
         }
     }
 }
开发者ID:dozernz,项目名称:server,代码行数:24,代码来源:KSecureEntryHelper.class.php

示例4: applyAccessControlOnContextData

 private function applyAccessControlOnContextData(accessControlScope $accessControlScope)
 {
     if ($this->isAdmin) {
         return;
     }
     $accessControl = $this->entry->getAccessControl();
     /* @var $accessControl accessControl */
     if ($accessControl && $accessControl->hasRules()) {
         $this->isSecured = true;
         if (kConf::hasMap("optimized_playback")) {
             $partnerId = $accessControl->getPartnerId();
             $optimizedPlayback = kConf::getMap("optimized_playback");
             if (array_key_exists($partnerId, $optimizedPlayback)) {
                 $params = $optimizedPlayback[$partnerId];
                 if (array_key_exists('cache_kdp_access_control', $params) && $params['cache_kdp_access_control'] && (strpos(strtolower(kCurrentContext::$client_lang), "kdp") !== false || strpos(strtolower(kCurrentContext::$client_lang), "html") !== false)) {
                     return;
                 }
             }
         }
         $accessControlScope->setEntryId($this->entry->getId());
         $this->isAdmin = $accessControlScope->getKs() && $accessControlScope->getKs()->isAdmin();
         $this->disableCache = $accessControl->applyContext($this->contextDataResult);
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:24,代码来源:kContextDataHelper.php

示例5: shouldContribute

 /**
  * @param entry $entry
  * @return bool
  */
 protected function shouldContribute(entry $entry)
 {
     if ($entry->getAccessControl()) {
         foreach ($entry->getAccessControl()->getRulesArray() as $rule) {
             /**
              * @var kRule $rule
              */
             foreach ($rule->getActions() as $action) {
                 /**
                  * @var kRuleAction $action
                  */
                 if ($action->getType() == DrmAccessControlActionType::DRM_POLICY) {
                     return true;
                 }
             }
         }
     }
     return false;
 }
开发者ID:DBezemer,项目名称:server,代码行数:23,代码来源:DrmPlugin.php


注:本文中的entry::getAccessControl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。