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#10090 Ensure anonymity in discussions for double blind reviews #10391

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions controllers/grid/queries/form/QueryForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,13 +319,11 @@ public function fetch($request, $template = null, $display = false, $actionArgs
// if current user is an anonymous reviewer, filter out authors
foreach ($reviewAssignments as $reviewAssignment) {
if ($reviewAssignment->getReviewerId() == $user->getId()) {
if ($reviewAssignment->getReviewMethod() != ReviewAssignment::SUBMISSION_REVIEW_METHOD_OPEN) {
// Replaces StageAssignmentDAO::getBySubmissionAndRoleId
if ($reviewAssignment->getReviewMethod() == ReviewAssignment::SUBMISSION_REVIEW_METHOD_DOUBLEANONYMOUS ) {
// exclude authors from the list of participants to ensure anonymity
$excludeUsers = StageAssignment::withSubmissionIds([$query->getAssocId()])
->withRoleIds([Role::ROLE_ID_AUTHOR])
->withUserId($user->getId())
->get()
->pluck('userId')
->pluck('user_id')
Copy link
Collaborator

Choose a reason for hiding this comment

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

We avoid usage of column names outside of a query builder. I see that UseCamelCasing doesn't convert when not calling the model directly. If it's impossible to avoid, we can just create a scope for a Model. Here we can just get the collection first and then call pluck on the collection, how it was implemented before.

->all();
}
}
Expand Down