Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OJS][main] #9887 Invitation API Support #4244

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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) 2023 Simon Fraser University
* Copyright (c) 2023 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\PKPInvitationController;

return new \PKP\handler\APIHandler(new PKPInvitationController());
7 changes: 3 additions & 4 deletions pages/reviewer/ReviewerHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
->getByMD5Key($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 @@ -76,4 +76,5 @@
<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="PAYMENT_REQUEST_NOTIFICATION" name="mailable.paymentRequest.name" subject="emails.paymentRequestNotification.subject" body="emails.paymentRequestNotification.body"/>
<email key="CHANGE_EMAIL" name="mailable.changeProfileEmailInvitationNotify.name" subject="emails.changeProfileEmailInvitationNotify.subject" body="emails.changeProfileEmailInvitationNotify.body"/>
</emails>