From 91eb513635a7a58d575155792126f15275154afd Mon Sep 17 00:00:00 2001 From: Alec Smecher Date: Tue, 4 Jun 2024 14:59:01 -0700 Subject: [PATCH] Port https://github.com/pkp/ojs/pull/4297 to OMP --- api/v1/invitations/index.php | 21 +++++++++++++++++++++ dbscripts/xml/upgrade.xml | 1 + pages/reviewer/ReviewerHandler.php | 6 ++---- registry/emailTemplates.xml | 1 + 4 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 api/v1/invitations/index.php diff --git a/api/v1/invitations/index.php b/api/v1/invitations/index.php new file mode 100644 index 00000000000..3b29c4a08b9 --- /dev/null +++ b/api/v1/invitations/index.php @@ -0,0 +1,21 @@ + + diff --git a/pages/reviewer/ReviewerHandler.php b/pages/reviewer/ReviewerHandler.php index 8c31d33936d..edfeeb738dc 100644 --- a/pages/reviewer/ReviewerHandler.php +++ b/pages/reviewer/ReviewerHandler.php @@ -52,12 +52,10 @@ public function authorize($request, &$args, $roleAssignments) if ($context->getData('reviewerAccessKeysEnabled')) { $accessKeyCode = $request->getUserVar('key'); if ($accessKeyCode) { - $keyHash = md5($accessKeyCode); - - $invitation = Repo::invitation()->getBOByKeyHash($keyHash); + $invitation = Repo::invitation()->getByKey($accessKeyCode); if (isset($invitation)) { - $invitation->acceptHandle(); + $invitation->acceptHandle($request); } } } diff --git a/registry/emailTemplates.xml b/registry/emailTemplates.xml index baaa1cb15a8..58610ce4a85 100644 --- a/registry/emailTemplates.xml +++ b/registry/emailTemplates.xml @@ -68,4 +68,5 @@ +