Skip to content

Commit

Permalink
pkp/pkp-lib#10459 Support for role assignment invitation
Browse files Browse the repository at this point in the history
  • Loading branch information
defstat committed Sep 26, 2024
1 parent 0ae3af7 commit 18a9638
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pages/reviewer/ReviewerHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

use APP\core\Request;
use APP\facades\Repo;
use PKP\invitation\core\enums\InvitationAction;
use PKP\pages\reviewer\PKPReviewerHandler;
use PKP\security\authorization\SubmissionAccessPolicy;
use PKP\security\Role;
Expand Down Expand Up @@ -55,7 +56,9 @@ public function authorize($request, &$args, $roleAssignments)
$invitation = Repo::invitation()->getByKey($accessKeyCode);

if (isset($invitation)) {
$invitation->acceptHandle($request);
$invitationHandler = $invitation->getInvitationActionRedirectController();
$invitationHandler->preRedirectActions(InvitationAction::ACCEPT);
$invitationHandler->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 @@ -71,4 +71,5 @@
<email key="CHANGE_EMAIL" name="mailable.changeProfileEmailInvitationNotify.name" subject="emails.changeProfileEmailInvitationNotify.subject" body="emails.changeProfileEmailInvitationNotify.body"/>
<email key="ORCID_COLLECT_AUTHOR_ID" name="orcidProfile.orcidCollectAuthorId.name" subject="emails.orcidCollectAuthorId.subject" body="emails.orcidCollectAuthorId.body"/>
<email key="ORCID_REQUEST_AUTHOR_AUTHORIZATION" name="orcidProfile.orcidRequestAuthorAuthorization.name" subject="emails.orcidRequestAuthorAuthorization.subject" body="emails.orcidRequestAuthorAuthorization.body"/>
<email key="USER_ROLE_ASSIGNMENT_INVITATION" name="mailable.userRoleAssignmentInvitationNotify.name" subject="emails.userRoleAssignmentInvitationNotify.subject" body="emails.userRoleAssignmentInvitationNotify.body"/>
</emails>

0 comments on commit 18a9638

Please sign in to comment.