getRequest(); // Get the submission id. $submissionId = $this->getDataObjectId(); if ($submissionId === false) return AUTHORIZATION_DENY; // Get the user $user =& $request->getUser(); if (!is_a($user, 'PKPUser')) return AUTHORIZATION_DENY; // Validate the article id. $copyeditorSubmissionDao =& DAORegistry::getDAO('CopyeditorSubmissionDAO'); $copyeditorSubmission =& $copyeditorSubmissionDao->getCopyeditorSubmission($submissionId, $user->getId()); if (!is_a($copyeditorSubmission, 'CopyeditorSubmission')) return AUTHORIZATION_DENY; // Check whether the article is actually part of the journal // in the context. $router =& $request->getRouter(); $journal =& $router->getContext($request); if (!is_a($journal, 'Journal')) return AUTHORIZATION_DENY; if ($copyeditorSubmission->getJournalId() != $journal->getId()) return AUTHORIZATION_DENY; // Save the copyeditor submission to the authorization context. $this->addAuthorizedContextObject(ASSOC_TYPE_ARTICLE, $copyeditorSubmission); return AUTHORIZATION_PERMIT; } } ?>