Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkp/pkp-lib#10537 Add available editorial decisions to submission's stages data #796

Merged
merged 2 commits into from
Oct 26, 2024

Conversation

taslangraham
Copy link
Contributor

@taslangraham taslangraham force-pushed the i10537-main branch 6 times, most recently from 987dd87 to 999d868 Compare October 24, 2024 20:14
$isOnlyRecommending = $permissions['isOnlyRecommending'];
$decisionTypes = []; /** @var DecisionType[] $decisionTypes */

if ($isOnlyRecommending) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@taslangraham taslangraham marked this pull request as ready for review October 24, 2024 20:29
$userHasAccessibleRoles = $user->hasRole([Role::ROLE_ID_SUB_EDITOR, Role::ROLE_ID_MANAGER, Role::ROLE_ID_SITE_ADMIN, Role::ROLE_ID_ASSISTANT], $request->getContext()->getId());
$permissions = $this->checkDecisionPermissions($stageId, $submission, $user, $request->getContext()->getId());

if (!$userHasAccessibleRoles || !$isActiveStage || !$permissions['canMakeDecision'] || $stageId !== WORKFLOW_STAGE_ID_PRODUCTION/** Only the production stage is supported in OPS.*/) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would maybe add the comment on the line above as having it in the middle if the if statement is a little hard to parse at first glance.

@taslangraham taslangraham merged commit c39fcd6 into pkp:main Oct 26, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants