From 29715c3c72dd43c9b90b8026ca7f204a7560e854 Mon Sep 17 00:00:00 2001 From: Bozana Bokan Date: Thu, 18 May 2017 14:48:00 +0200 Subject: [PATCH] pkp/pkp-lib#1828 Fix back-end access to declined review assignment --- .../security/authorization/ReviewStageAccessPolicy.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/classes/security/authorization/ReviewStageAccessPolicy.inc.php b/classes/security/authorization/ReviewStageAccessPolicy.inc.php index bb981d36daa..ff247d4c4ec 100644 --- a/classes/security/authorization/ReviewStageAccessPolicy.inc.php +++ b/classes/security/authorization/ReviewStageAccessPolicy.inc.php @@ -23,8 +23,9 @@ class ReviewStageAccessPolicy extends ContextPolicy { * @param $roleAssignments array * @param $submissionParameterName string * @param $stageId integer One of the WORKFLOW_STAGE_ID_* constants. + * @param $permitDeclined bool Whether to permit reviewers to fetch declined review assignments. */ - function __construct($request, &$args, $roleAssignments, $submissionParameterName = 'submissionId', $stageId) { + function __construct($request, &$args, $roleAssignments, $submissionParameterName, $stageId, $permitDeclined = false) { parent::__construct($request); // Create a "permit overrides" policy set that specifies @@ -38,7 +39,7 @@ function __construct($request, &$args, $roleAssignments, $submissionParameterNam if ($stageId == WORKFLOW_STAGE_ID_EXTERNAL_REVIEW) { // All review rounds in OJS occur in 'external' review. // Add the submission policy, for reviewer roles import('lib.pkp.classes.security.authorization.SubmissionAccessPolicy'); - $submissionPolicy = new SubmissionAccessPolicy($request, $args, $roleAssignments, $submissionParameterName); + $submissionPolicy = new SubmissionAccessPolicy($request, $args, $roleAssignments, $submissionParameterName, $permitDeclined); $submissionPolicy->addPolicy(new WorkflowStageRequiredPolicy($stageId)); $workflowStagePolicy->addPolicy($submissionPolicy); }