Skip to content

Commit

Permalink
reduce issue perms
Browse files Browse the repository at this point in the history
  • Loading branch information
jardakotesovec committed Jun 13, 2024
1 parent 7007e65 commit 2eb513f
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 = true;
if (isset($collector->isPublished) && !$collector->isPublished && !$isAdmin) {
return response()->json([
'error' => __('api.submissions.403.unpublishedIssues'),
Expand Down

0 comments on commit 2eb513f

Please sign in to comment.