Skip to content

Commit

Permalink
pkp/pkp-lib#8333 Replaced CONTEXT_SITE by SITE_CONTEXT_ID
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasraoni committed Jul 24, 2024
1 parent a4256f5 commit 14eeace
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/v1/issues/IssueController.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public function getMany(Request $illuminateRequest): JsonResponse
Hook::call('API::issues::params', [&$collector, $illuminateRequest]);

// You must be a manager or site admin to access unpublished Issues
$isAdmin = $currentUser->hasRole([Role::ROLE_ID_MANAGER], $context->getId()) || $currentUser->hasRole([Role::ROLE_ID_SITE_ADMIN], \PKP\core\PKPApplication::CONTEXT_SITE);
$isAdmin = $currentUser->hasRole([Role::ROLE_ID_MANAGER], $context->getId()) || $currentUser->hasRole([Role::ROLE_ID_SITE_ADMIN], \PKP\core\PKPApplication::SITE_CONTEXT_ID);
if (isset($collector->isPublished) && !$collector->isPublished && !$isAdmin) {
return response()->json([
'error' => __('api.submissions.403.unpublishedIssues'),
Expand Down

0 comments on commit 14eeace

Please sign in to comment.