Skip to content

Commit

Permalink
pkp#7505 Fix publication access (pkp#9581)
Browse files Browse the repository at this point in the history
  • Loading branch information
defstat authored and ipula committed Jan 11, 2024
1 parent f0ed82f commit d6289ae
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion api/v1/jats/PKPJatsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
use PKP\db\DAORegistry;
use PKP\security\authorization\ContextAccessPolicy;
use PKP\security\authorization\internal\SubmissionFileStageAccessPolicy;
use PKP\security\authorization\PublicationAccessPolicy;
use PKP\security\authorization\PublicationWritePolicy;
use PKP\security\authorization\SubmissionFileAccessPolicy;
use PKP\security\authorization\UserRolesRequiredPolicy;
Expand Down Expand Up @@ -92,7 +93,11 @@ public function authorize(PKPRequest $request, array &$args, array $roleAssignme

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

$this->addPolicy(new PublicationWritePolicy($request, $args, $roleAssignments));
if ($actionName === 'get') {
$this->addPolicy(new PublicationAccessPolicy($request, $args, $roleAssignments));
} else {
$this->addPolicy(new PublicationWritePolicy($request, $args, $roleAssignments));
}

if ($actionName === 'add') {
$params = $illuminateRequest->input();
Expand Down

0 comments on commit d6289ae

Please sign in to comment.