From bdcf22434ce026d184377f66f0ec2f04baaa8480 Mon Sep 17 00:00:00 2001 From: Alec Smecher Date: Tue, 4 Jun 2024 14:55:07 -0700 Subject: [PATCH] [OJS][main] #9887 Invitation API Support (#4297) * pkp/pkp-lib#9887 API Support * pkp/pkp-lib#9887 Redesigning Invitations * pkp/pkp-lib#9887 Add ChangeProfileEmail Invitation * pkp/pkp-lib#9887 Remove unnecessary PKP classname prefixes * pkp/pkp-lib#9887 Fix copyright dates for new code * pkp/pkp-lib#9887 Add email template on upgrade * pkp/pkp-lib#9887 Don't put hash method into function name * pkp/pkp-lib#9887 Submodule update ##asmecher/i9887## --------- Co-authored-by: Dimitris Efstathiou --- api/v1/invitations/index.php | 21 +++++++++++++++++++++ dbscripts/xml/upgrade.xml | 1 + lib/pkp | 2 +- pages/reviewer/ReviewerHandler.php | 7 +++---- registry/emailTemplates.xml | 1 + 5 files changed, 27 insertions(+), 5 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/lib/pkp b/lib/pkp index fe0950d75c8..24589dfdc2f 160000 --- a/lib/pkp +++ b/lib/pkp @@ -1 +1 @@ -Subproject commit fe0950d75c87b3a70d6de9efa94c322969c52e18 +Subproject commit 24589dfdc2f008fa6730d8534ed6fdd442e298b7 diff --git a/pages/reviewer/ReviewerHandler.php b/pages/reviewer/ReviewerHandler.php index ffef835299b..aa5b9899537 100644 --- a/pages/reviewer/ReviewerHandler.php +++ b/pages/reviewer/ReviewerHandler.php @@ -60,12 +60,11 @@ 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 33a38623f5c..de4eee21cf6 100644 --- a/registry/emailTemplates.xml +++ b/registry/emailTemplates.xml @@ -76,4 +76,5 @@ +