當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。