当前位置: 首页>>代码示例>>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;未经允许,请勿转载。