當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Handler::authorize方法代碼示例

本文整理匯總了PHP中Handler::authorize方法的典型用法代碼示例。如果您正苦於以下問題:PHP Handler::authorize方法的具體用法?PHP Handler::authorize怎麽用?PHP Handler::authorize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Handler的用法示例。


在下文中一共展示了Handler::authorize方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: authorize

 /**
  * @copydoc PKPHandler::authorize()
  */
 function authorize($request, &$args, $roleAssignments)
 {
     $stageId = (int) $request->getUserVar('stageId');
     import('classes.security.authorization.WorkflowStageAccessPolicy');
     $this->addPolicy(new WorkflowStageAccessPolicy($request, $args, $roleAssignments, 'submissionId', $stageId));
     return parent::authorize($request, $args, $roleAssignments);
 }
開發者ID:energylevels,項目名稱:pkp-lib,代碼行數:10,代碼來源:PublicationEntryHandler.inc.php

示例2: authorize

 /**
  * @copydoc PKPHandler::authorize()
  */
 function authorize($request, &$args, $roleAssignments)
 {
     // Require a submission
     import('classes.security.authorization.SubmissionAccessPolicy');
     $this->addPolicy(new SubmissionAccessPolicy($request, $args, $roleAssignments, 'submissionId'));
     return parent::authorize($request, $args, $roleAssignments);
 }
開發者ID:doana,項目名稱:pkp-lib,代碼行數:10,代碼來源:InformationCenterHandler.inc.php

示例3: authorize

 /**
  * @copydoc PKPHandler::authorize()
  */
 function authorize($request, &$args, $roleAssignments)
 {
     // We need a review round id in request.
     import('lib.pkp.classes.security.authorization.internal.ReviewRoundRequiredPolicy');
     $this->addPolicy(new ReviewRoundRequiredPolicy($request, $args));
     return parent::authorize($request, $args, $roleAssignments);
 }
開發者ID:jprk,項目名稱:pkp-lib,代碼行數:10,代碼來源:PKPReviewRoundTabHandler.inc.php

示例4: authorize

 /**
  * @copydoc PKPHandler::authorize()
  */
 function authorize($request, &$args, $roleAssignments)
 {
     // Allow both reviewers (if in review) and context roles.
     import('classes.security.authorization.ReviewStageAccessPolicy');
     $this->addPolicy(new ReviewStageAccessPolicy($request, $args, $roleAssignments, 'submissionId', $request->getUserVar('stageId')), true);
     return parent::authorize($request, $args, $roleAssignments);
 }
開發者ID:mczirfusz,項目名稱:pkp-lib,代碼行數:10,代碼來源:FileManagementHandler.inc.php

示例5: authorize

 /**
  * @see PKPHandler::authorize()
  * @param $request PKPRequest
  * @param $args array
  * @param $roleAssignments array
  */
 function authorize(&$request, $args, $roleAssignments)
 {
     $stageId = $request->getUserVar('stageId');
     import('classes.security.authorization.OmpWorkflowStageAccessPolicy');
     $this->addPolicy(new OmpWorkflowStageAccessPolicy($request, $args, $roleAssignments, 'monographId', $stageId));
     return parent::authorize($request, $args, $roleAssignments);
 }
開發者ID:ramonsodoma,項目名稱:omp,代碼行數:13,代碼來源:SubmissionParticipantsHandler.inc.php

示例6: authorize

 function authorize($request, &$args, $roleAssignments)
 {
     $fileIds = $request->getUserVar('filesIdsAndRevisions');
     $libraryFileId = $request->getUserVar('libraryFileId');
     if (is_string($fileIds)) {
         $fileIdsArray = explode(';', $fileIds);
         // Remove empty entries (a trailing ";" will cause these)
         $fileIdsArray = array_filter($fileIdsArray, create_function('$a', 'return !empty($a);'));
     }
     if (!empty($fileIdsArray)) {
         $multipleSubmissionFileAccessPolicy = new PolicySet(COMBINING_DENY_OVERRIDES);
         foreach ($fileIdsArray as $fileIdAndRevision) {
             $multipleSubmissionFileAccessPolicy->addPolicy($this->_getAccessPolicy($request, $args, $roleAssignments, $fileIdAndRevision));
         }
         $this->addPolicy($multipleSubmissionFileAccessPolicy);
     } else {
         if (is_numeric($libraryFileId)) {
             import('lib.pkp.classes.security.authorization.ContextAccessPolicy');
             $this->addPolicy(new ContextAccessPolicy($request, $roleAssignments));
         } else {
             // IDs will be specified using the default parameters.
             $this->addPolicy($this->_getAccessPolicy($request, $args, $roleAssignments));
         }
     }
     return parent::authorize($request, $args, $roleAssignments);
 }
開發者ID:selwyntcy,項目名稱:pkp-lib,代碼行數:26,代碼來源:FileApiHandler.inc.php

示例7: authorize

 /**
  * @copydoc PKPHandler::authorize()
  */
 function authorize($request, &$args, $roleAssignments)
 {
     // User must be logged in
     import('lib.pkp.classes.security.authorization.UserRequiredPolicy');
     $this->addPolicy(new UserRequiredPolicy($request));
     return parent::authorize($request, $args, $roleAssignments);
 }
開發者ID:energylevels,項目名稱:pkp-lib,代碼行數:10,代碼來源:ProfileTabHandler.inc.php

示例8: authorize

 /**
  * @copydoc PKPHandler::authorize()
  */
 function authorize($request, &$args, $roleAssignments)
 {
     // Authorize stage id.
     import('lib.pkp.classes.security.authorization.WorkflowStageAccessPolicy');
     $this->addPolicy(new WorkflowStageAccessPolicy($request, $args, $roleAssignments, 'submissionId', $this->_identifyStageId($request)));
     return parent::authorize($request, $args, $roleAssignments);
 }
開發者ID:jack-cade-inc,項目名稱:pkp-lib,代碼行數:10,代碼來源:WorkflowTabHandler.inc.php

示例9: authorize

 /**
  * @copydoc PKPHandler::authorize()
  */
 function authorize($request, &$args, $roleAssignments)
 {
     // Some operations need a review round id in request.
     $reviewRoundOps = $this->_getReviewRoundOps();
     import('lib.pkp.classes.security.authorization.internal.ReviewRoundRequiredPolicy');
     $this->addPolicy(new ReviewRoundRequiredPolicy($request, $args, 'reviewRoundId', $reviewRoundOps));
     return parent::authorize($request, $args, $roleAssignments);
 }
開發者ID:pkp,項目名稱:pkp-lib,代碼行數:11,代碼來源:PKPEditorDecisionHandler.inc.php

示例10: authorize

 /**
  * @copydoc PKPHandler::authorize()
  */
 function authorize($request, &$args, $roleAssignments)
 {
     import('lib.pkp.classes.security.authorization.ContextRequiredPolicy');
     $this->addPolicy(new ContextRequiredPolicy($request));
     import('classes.security.authorization.OjsJournalMustPublishPolicy');
     $this->addPolicy(new OjsJournalMustPublishPolicy($request));
     return parent::authorize($request, $args, $roleAssignments);
 }
開發者ID:selwyntcy,項目名稱:ojs,代碼行數:11,代碼來源:ArticleHandler.inc.php

示例11: authorize

 /**
  * @copydoc PKPHandler::authorize()
  */
 function authorize($request, &$args, $roleAssignments)
 {
     import('lib.pkp.classes.security.authorization.PKPSiteAccessPolicy');
     $this->addPolicy(new PKPSiteAccessPolicy($request, array('header', 'sidebar', 'css'), SITE_ACCESS_ALL_ROLES));
     if (!Config::getVar('general', 'installed')) {
         define('SESSION_DISABLE_INIT', true);
     }
     return parent::authorize($request, $args, $roleAssignments, false);
 }
開發者ID:doana,項目名稱:pkp-lib,代碼行數:12,代碼來源:PageHandler.inc.php

示例12: authorize

 /**
  * @copydoc PKPHandler::authorize
  */
 function authorize($request, &$args, $roleAssignments)
 {
     $returner = parent::authorize($request, $args, $roleAssignments);
     if (!Config::getVar('oai', 'oai')) {
         return false;
     } else {
         return $returner;
     }
 }
開發者ID:PublishingWithoutWalls,項目名稱:omp,代碼行數:12,代碼來源:OAIHandler.inc.php

示例13: authorize

 /**
  * @copydoc PKPHandler::authorize()
  */
 function authorize($request, &$args, $roleAssignments)
 {
     switch ($op = $request->getRequestedOp()) {
         case 'signInAsUser':
             import('lib.pkp.classes.security.authorization.RoleBasedHandlerOperationPolicy');
             $this->addPolicy(new RoleBasedHandlerOperationPolicy($request, array(ROLE_ID_MANAGER, ROLE_ID_SITE_ADMIN), array('signInAsUser')));
             break;
     }
     return parent::authorize($request, $args, $roleAssignments);
 }
開發者ID:jprk,項目名稱:pkp-lib,代碼行數:13,代碼來源:PKPLoginHandler.inc.php

示例14: authorize

 /**
  * @copydoc PKPHandler::authorize()
  */
 function authorize($request, &$args, $roleAssignments)
 {
     $context = $request->getContext();
     if (!$context || !$context->getSetting('restrictSiteAccess')) {
         $templateMgr = TemplateManager::getManager($request);
         $templateMgr->setCacheability(CACHEABILITY_PUBLIC);
     }
     import('lib.pkp.classes.security.authorization.ContextRequiredPolicy');
     $this->addPolicy(new ContextRequiredPolicy($request));
     return parent::authorize($request, $args, $roleAssignments);
 }
開發者ID:relaciones-internacionales-journal,項目名稱:ojs,代碼行數:14,代碼來源:AboutContextHandler.inc.php

示例15: authorize

 /**
  * @copydoc PKPHandler::authorize()
  */
 function authorize($request, &$args, $roleAssignments)
 {
     import('lib.pkp.classes.security.authorization.ContextRequiredPolicy');
     $this->addPolicy(new ContextRequiredPolicy($request));
     import('classes.security.authorization.OjsJournalMustPublishPolicy');
     $this->addPolicy(new OjsJournalMustPublishPolicy($request));
     import('classes.security.authorization.OjsIssueRequiredPolicy');
     // the 'archives' op does not need this policy so it is left out of the operations array.
     $this->addPolicy(new OjsIssueRequiredPolicy($request, $args, array('view', 'download')));
     return parent::authorize($request, $args, $roleAssignments);
 }
開發者ID:mosvits,項目名稱:ojs,代碼行數:14,代碼來源:IssueHandler.inc.php


注:本文中的Handler::authorize方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。