Skip to content

Commit

Permalink
pkp#9453 Minor authorisation fix and enable_review_round_history feat…
Browse files Browse the repository at this point in the history
…ure switch removal
  • Loading branch information
defstat committed May 1, 2024
1 parent 9c3d107 commit 8b40f9f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
7 changes: 1 addition & 6 deletions api/v1/reviews/PKPReviewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,10 @@ public function getGroupRoutes(): void
*/
public function authorize(PKPRequest $request, array &$args, array $roleAssignments): bool
{
$illuminateRequest = $args[0]; /** @var \Illuminate\Http\Request $illuminateRequest */
$actionName = static::getRouteActionName($illuminateRequest);

$this->addPolicy(new UserRolesRequiredPolicy($request), true);
$this->addPolicy(new ContextAccessPolicy($request, $roleAssignments));

if ($actionName === 'getHistory') {
$this->addPolicy(new SubmissionAccessPolicy($request, $args, $roleAssignments, 'submissionId', true));
}
$this->addPolicy(new SubmissionAccessPolicy($request, $args, $roleAssignments, 'submissionId', true));

return parent::authorize($request, $args, $roleAssignments);
}
Expand Down
1 change: 0 additions & 1 deletion pages/reviewer/PKPReviewerHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ public function submission(array $args, PKPRequest $request): void
]);

$templateMgr->setState([
'isReviewRoundHistoryEnabled' => Config::getVar('features', 'enable_review_round_history'),
'pageInitConfig' => [
'reviewRoundHistories' => $reviewRoundHistories,
]
Expand Down
2 changes: 1 addition & 1 deletion templates/reviewer/review/reviewStepHeader.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</h1>

<!-- rest of this template will be moved inside this component in future -->
<reviewer-submission-page v-if="isReviewRoundHistoryEnabled" v-bind="pageInitConfig"></reviewer-submission-page>
<reviewer-submission-page v-bind="pageInitConfig"></reviewer-submission-page>

<script type="text/javascript">
// Attach the JS file tab handler.
Expand Down

0 comments on commit 8b40f9f

Please sign in to comment.