Add missing one-click login to OMP 3.4#2291
Conversation
|
@defstat, could you have a look at this one, both the PR for |
|
Getting failed tests but with errors that seem unrelated. |
|
Any information about this? Thinking mainly whether the changes in overall seem good since I would like to have this in our production site. |
@asmecher @ajnyga sorry for the delay on this. This does not need porting to stable-3_5_0 and main branches, in my opinion - the one-click feature is handled by invitations after 3.5.0, and the respective code is already in the |
|
Thanks! Agreed that no porting needed, it was rewritten and also OMP had the same logic in 3.5+. |
| } // e.g. deleted review assignment | ||
|
|
||
| $reviewSubmission = Repo::submission()->get($reviewAssignment->getSubmissionId()); | ||
| if (!$reviewSubmission || ($reviewSubmission->getId() != $reviewAssignment->getSubmissionId())) { |
There was a problem hiding this comment.
The $reviewSubmission->getId() != $reviewAssignment->getSubmissionId() will always be false here, since we're getting the submission from the review assignment.
However, there's no check to make sure that the review assignment and the review are from the current journal!
In OMP 3.4 the one click reviewer access seems to be broken. The email contains a link that looks ok, there is also corresponding line in access_keys. However, the link leads to the login page. In OJS 3.4 the one-click links works.
Seems that it is not handled at all in OMP 3.4
https://github.com/pkp/omp/blob/stable-3_4_0/pages/reviewer/ReviewerHandler.php
OJS 3.4 has the required handling
https://github.com/pkp/ojs/blob/stable-3_4_0/pages/reviewer/ReviewerHandler.php
This pr introduces the similar logic to OMP 3.4.