Skip to content

Commit

Permalink
pkp/pkp-lib#1828 Fix back-end access to declined review assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
bozana committed May 18, 2017
1 parent 5a6afbd commit 29715c3
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
}
Expand Down

0 comments on commit 29715c3

Please sign in to comment.