Skip to content

Commit

Permalink
Port pkp/ojs#4297 to OMP
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Jun 4, 2024
1 parent cfc283b commit 91eb513
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
21 changes: 21 additions & 0 deletions api/v1/invitations/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

/**
* @defgroup api_v1_invitations Invitations API requests
*/

/**
* @file api/v1/invitations/index.php
*
* 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
*
* @brief Handle API requests for invitations.
*/

use PKP\API\v1\invitations\InvitationController;

return new \PKP\handler\APIHandler(new InvitationController());
1 change: 1 addition & 0 deletions dbscripts/xml/upgrade.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@

<upgrade minversion="3.1.0.0" maxversion="3.4.9.9">
<migration class="PKP\migration\upgrade\v3_5_0\PreflightCheckMigration" fallback="3.4.9.9" />
<migration class="PKP\migration\upgrade\v3_5_0\InstallEmailTemplates"/>
<migration class="PKP\migration\upgrade\v3_5_0\I9197_MigrateAccessKeys"/>
<migration class="PKP\migration\upgrade\v3_5_0\I9253_SiteAnnouncements"/>
<migration class="APP\migration\upgrade\v3_5_0\I9262_Highlights"/>
Expand Down
6 changes: 2 additions & 4 deletions pages/reviewer/ReviewerHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down
1 change: 1 addition & 0 deletions registry/emailTemplates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,5 @@
<email key="EDITORIAL_REMINDER" name="mailable.editorialReminder.name" subject="emails.editorialReminder.subject" body="emails.editorialReminder.body"/>
<email key="SUBMISSION_SAVED_FOR_LATER" name="mailable.submissionSavedForLater.name" subject="emails.submissionSavedForLater.subject" body="emails.submissionSavedForLater.body"/>
<email key="SUBMISSION_NEEDS_EDITOR" name="mailable.submissionNeedsEditor.name" subject="emails.submissionNeedsEditor.subject" body="emails.submissionNeedsEditor.body"/>
<email key="CHANGE_EMAIL" name="mailable.changeProfileEmailInvitationNotify.name" subject="emails.changeProfileEmailInvitationNotify.subject" body="emails.changeProfileEmailInvitationNotify.body"/>
</emails>

0 comments on commit 91eb513

Please sign in to comment.