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


PHP AuthorizationPolicy类代码示例

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


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

示例1: isValid

 /**
  * @see HandlerValidator::isValid()
  */
 function isValid()
 {
     // Delegate to the AuthorizationPolicy
     if (!$this->_policy->applies()) {
         return false;
     }
     if ($this->_policy->effect() == AUTHORIZATION_DENY) {
         return false;
     } else {
         return true;
     }
 }
开发者ID:master3395,项目名称:CBPPlatform,代码行数:15,代码来源:HandlerValidatorPolicy.inc.php

示例2: isValid

 /**
  * @see HandlerValidator::isValid()
  */
 function isValid()
 {
     // Delegate to the AuthorizationPolicy
     if (!$this->_policy->applies()) {
         return false;
     }
     // Pass the authorized context to the police.
     $this->_policy->setAuthorizedContext($this->handler->getAuthorizedContext());
     if ($this->_policy->effect() == AUTHORIZATION_DENY) {
         return false;
     } else {
         return true;
     }
 }
开发者ID:EreminDm,项目名称:water-cao,代码行数:17,代码来源:HandlerValidatorPolicy.inc.php

示例3: HttpsPolicy

 /**
  * Constructor
  *
  * @param $request PKPRequest
  */
 function HttpsPolicy(&$request)
 {
     parent::AuthorizationPolicy();
     $this->_request =& $request;
     // Add advice
     $callOnDeny = array($request, 'redirectSSL', array());
     $this->setAdvice(AUTHORIZATION_ADVICE_CALL_ON_DENY, $callOnDeny);
 }
开发者ID:EreminDm,项目名称:water-cao,代码行数:13,代码来源:HttpsPolicy.inc.php

示例4: SubmissionRequiredPolicy

 /**
  * Constructor
  * @param $request PKPRequest
  * @param $args array request parameters
  * @param $submissionParameterName string the request parameter we expect
  *  the submission id in.
  * @param $message string
  */
 function SubmissionRequiredPolicy(&$request, &$args, $submissionParameterName = 'submissionId', $message = null)
 {
     parent::AuthorizationPolicy($message);
     $this->_request =& $request;
     assert(is_array($args));
     $this->_args =& $args;
     $this->_submissionParameterName = $submissionParameterName;
 }
开发者ID:master3395,项目名称:CBPPlatform,代码行数:16,代码来源:SubmissionRequiredPolicy.inc.php

示例5: DataObjectRequiredPolicy

 /**
  * Constructor
  * @param $request PKPRequest
  * @param $args array request parameters
  * @param $parameterName string the request parameter we expect
  * @param $message string
  * @param $operations array Optional list of operations for which this check takes effect. If specified, operations outside this set will not be checked against this policy.
  */
 function DataObjectRequiredPolicy(&$request, &$args, $parameterName, $message = null, $operations = null)
 {
     parent::AuthorizationPolicy($message);
     $this->_request =& $request;
     assert(is_array($args));
     $this->_args =& $args;
     $this->_parameterName = $parameterName;
     $this->_operations = $operations;
 }
开发者ID:yuricampos,项目名称:ojs,代码行数:17,代码来源:DataObjectRequiredPolicy.inc.php

示例6: HandlerOperationPolicy

 /**
  * Constructor
  * @param $request PKPRequest
  * @param $operations array|string either a single operation or a list of operations that
  *  this policy is targeting.
  * @param $message string a message to be displayed if the authorization fails
  */
 function HandlerOperationPolicy(&$request, $operations, $message = null)
 {
     parent::AuthorizationPolicy($message);
     $this->_request =& $request;
     // Make sure a single operation doesn't have to
     // be passed in as an array.
     assert(is_string($operations) || is_array($operations));
     if (!is_array($operations)) {
         $operations = array($operations);
     }
     $this->_operations = $operations;
 }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:19,代码来源:HandlerOperationPolicy.inc.php

示例7: WorkflowSettingsAssignmentPolicy

 /**
  * Constructor
  * @param $request PKPRequest
  */
 function WorkflowSettingsAssignmentPolicy(&$request)
 {
     parent::AuthorizationPolicy('user.authorization.workflowStageSettingMissing');
     $this->_request =& $request;
 }
开发者ID:ramonsodoma,项目名称:omp,代码行数:9,代码来源:WorkflowSettingsAssignmentPolicy.inc.php

示例8: UserRolesRequiredPolicy

 /**
  * Constructor
  *
  * @param $request PKPRequest
  */
 function UserRolesRequiredPolicy($request)
 {
     parent::AuthorizationPolicy();
     $this->_request = $request;
 }
开发者ID:mczirfusz,项目名称:pkp-lib,代码行数:10,代码来源:UserRolesRequiredPolicy.inc.php

示例9: ContextRequiredPolicy

 /**
  * Constructor
  *
  * @param $request PKPRequest
  */
 function ContextRequiredPolicy(&$request, $message = 'user.authorization.contextRequired')
 {
     parent::AuthorizationPolicy($message);
     $this->_request =& $request;
 }
开发者ID:farhanabbas1983,项目名称:ojs-1,代码行数:10,代码来源:ContextRequiredPolicy.inc.php

示例10: QueryAssignedToUserAccessPolicy

 /**
  * Constructor
  * @param $request PKPRequest
  */
 function QueryAssignedToUserAccessPolicy($request)
 {
     parent::AuthorizationPolicy('user.authorization.submissionQuery');
     $this->_request = $request;
 }
开发者ID:jprk,项目名称:pkp-lib,代码行数:9,代码来源:QueryAssignedToUserAccessPolicy.inc.php

示例11: UserAccessibleWorkflowStagePolicy

 /**
  * Constructor
  * @param $stageId The one that will be checked against accessible
  * user workflow stages.
  */
 function UserAccessibleWorkflowStagePolicy($stageId)
 {
     parent::AuthorizationPolicy();
     $this->_stageId = $stageId;
 }
开发者ID:relaciones-internacionales-journal,项目名称:pkp-lib,代码行数:10,代码来源:UserAccessibleWorkflowStagePolicy.inc.php

示例12: ReviewAssignmentAccessPolicy

 /**
  * Constructor
  * @param $request PKPRequest
  */
 function ReviewAssignmentAccessPolicy(&$request)
 {
     parent::AuthorizationPolicy('user.authorization.monographReviewer');
     $this->_request =& $request;
 }
开发者ID:jerico-dev,项目名称:omp,代码行数:9,代码来源:ReviewAssignmentAccessPolicy.inc.php

示例13: ReviewAssignmentAccessPolicy

 /**
  * Constructor
  * @param $request PKPRequest
  */
 function ReviewAssignmentAccessPolicy($request)
 {
     parent::AuthorizationPolicy('user.authorization.submissionReviewer');
     $this->_request = $request;
 }
开发者ID:mczirfusz,项目名称:pkp-lib,代码行数:9,代码来源:ReviewAssignmentAccessPolicy.inc.php

示例14: ManagerRequiredPolicy

 /**
  * Constructor
  * @param $request PKPRequest
  */
 function ManagerRequiredPolicy($request)
 {
     parent::AuthorizationPolicy('user.authorization.managerRequired');
     $this->_request = $request;
 }
开发者ID:jprk,项目名称:pkp-lib,代码行数:9,代码来源:ManagerRequiredPolicy.inc.php

示例15: array

 /**
  * Constructor
  *
  * @param $request PKPRequest
  */
 function __construct($request)
 {
     parent::__construct();
     $this->_request = $request;
     // Add advice
     $callOnDeny = array($request, 'redirectSSL', array());
     $this->setAdvice(AUTHORIZATION_ADVICE_CALL_ON_DENY, $callOnDeny);
 }
开发者ID:PublishingWithoutWalls,项目名称:pkp-lib,代码行数:13,代码来源:HttpsPolicy.inc.php


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