From 640590b821f4a1034caeee17a7a5982fd4be569d Mon Sep 17 00:00:00 2001 From: Dimitris Efstathiou Date: Mon, 15 Apr 2024 19:05:43 +0300 Subject: [PATCH 1/8] pkp/pkp-lib#9887 API Support --- api/v1/invitations/index.php | 21 +++++++++++++++++++++ pages/reviewer/ReviewerHandler.php | 5 ++--- 2 files changed, 23 insertions(+), 3 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..047483af047 --- /dev/null +++ b/api/v1/invitations/index.php @@ -0,0 +1,21 @@ +getData('reviewerAccessKeysEnabled')) { $accessKeyCode = $request->getUserVar('key'); if ($accessKeyCode) { - $keyHash = md5($accessKeyCode); - - $invitation = Repo::invitation()->getBOByKeyHash($keyHash); + $invitation = Repo::invitation() + ->getByMD5Key($accessKeyCode); if (isset($invitation)) { $invitation->acceptHandle(); From 4b3175adb215380088bd454b876c2d6b2ba98cad Mon Sep 17 00:00:00 2001 From: Dimitris Efstathiou Date: Sat, 4 May 2024 21:05:58 +0300 Subject: [PATCH 2/8] pkp/pkp-lib#9887 Redesigning Invitations --- pages/reviewer/ReviewerHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/reviewer/ReviewerHandler.php b/pages/reviewer/ReviewerHandler.php index ce04ff713b3..cc19a6d81fc 100644 --- a/pages/reviewer/ReviewerHandler.php +++ b/pages/reviewer/ReviewerHandler.php @@ -64,7 +64,7 @@ public function authorize($request, &$args, $roleAssignments) ->getByMD5Key($accessKeyCode); if (isset($invitation)) { - $invitation->acceptHandle(); + $invitation->acceptHandle($request); } } } From 3712773aea670007518dae16dc32226af0271df7 Mon Sep 17 00:00:00 2001 From: Dimitris Efstathiou Date: Thu, 9 May 2024 14:02:30 +0300 Subject: [PATCH 3/8] pkp/pkp-lib#9887 Add ChangeProfileEmail Invitation --- registry/emailTemplates.xml | 1 + 1 file changed, 1 insertion(+) 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 @@ + From 50ac7ae33923cc060dae6aaf95114eb475d3d76c Mon Sep 17 00:00:00 2001 From: Alec Smecher Date: Tue, 4 Jun 2024 12:35:11 -0700 Subject: [PATCH 4/8] pkp/pkp-lib#9887 Remove unnecessary PKP classname prefixes --- api/v1/invitations/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/v1/invitations/index.php b/api/v1/invitations/index.php index 047483af047..7c3920c7e92 100644 --- a/api/v1/invitations/index.php +++ b/api/v1/invitations/index.php @@ -16,6 +16,6 @@ * @brief Handle API requests for invitations. */ -use PKP\API\v1\invitations\PKPInvitationController; +use PKP\API\v1\invitations\InvitationController; -return new \PKP\handler\APIHandler(new PKPInvitationController()); +return new \PKP\handler\APIHandler(new InvitationController()); From 047f51463754b74eaf4bda22f9440aed3438eb86 Mon Sep 17 00:00:00 2001 From: Alec Smecher Date: Tue, 4 Jun 2024 12:51:12 -0700 Subject: [PATCH 5/8] pkp/pkp-lib#9887 Fix copyright dates for new code --- api/v1/invitations/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/v1/invitations/index.php b/api/v1/invitations/index.php index 7c3920c7e92..3b29c4a08b9 100644 --- a/api/v1/invitations/index.php +++ b/api/v1/invitations/index.php @@ -7,8 +7,8 @@ /** * @file api/v1/invitations/index.php * - * Copyright (c) 2023 Simon Fraser University - * Copyright (c) 2023 John Willinsky + * Copyright (c) 2024 Simon Fraser University + * Copyright (c) 2024 John Willinsky * Distributed under the GNU GPL v3. For full terms see the file docs/COPYING. * * @ingroup api_v1_invitations From e21ffe8c6e621f0fc51bd646b72d99394e745e83 Mon Sep 17 00:00:00 2001 From: Alec Smecher Date: Tue, 4 Jun 2024 13:17:01 -0700 Subject: [PATCH 6/8] pkp/pkp-lib#9887 Add email template on upgrade --- dbscripts/xml/upgrade.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/dbscripts/xml/upgrade.xml b/dbscripts/xml/upgrade.xml index c662a2df355..fbfbd7b36a7 100644 --- a/dbscripts/xml/upgrade.xml +++ b/dbscripts/xml/upgrade.xml @@ -120,6 +120,7 @@ + From 5a6b53d0047e90be383f37d5ca075dffd3b5456c Mon Sep 17 00:00:00 2001 From: Alec Smecher Date: Tue, 4 Jun 2024 13:20:05 -0700 Subject: [PATCH 7/8] pkp/pkp-lib#9887 Don't put hash method into function name --- pages/reviewer/ReviewerHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/reviewer/ReviewerHandler.php b/pages/reviewer/ReviewerHandler.php index cc19a6d81fc..aa5b9899537 100644 --- a/pages/reviewer/ReviewerHandler.php +++ b/pages/reviewer/ReviewerHandler.php @@ -61,7 +61,7 @@ public function authorize($request, &$args, $roleAssignments) $accessKeyCode = $request->getUserVar('key'); if ($accessKeyCode) { $invitation = Repo::invitation() - ->getByMD5Key($accessKeyCode); + ->getByKey($accessKeyCode); if (isset($invitation)) { $invitation->acceptHandle($request); From d63180e465a3229f0d0b18eab45198f3d3917afe Mon Sep 17 00:00:00 2001 From: Alec Smecher Date: Tue, 4 Jun 2024 12:52:26 -0700 Subject: [PATCH 8/8] pkp/pkp-lib#9887 Submodule update ##asmecher/i9887## --- lib/pkp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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