_request =& $request; } // // Implement template methods from AuthorizationPolicy // /** * @see AuthorizationPolicy::effect() */ function effect() { // Get the user $user =& $this->_request->getUser(); if (!is_a($user, 'PKPUser')) return AUTHORIZATION_DENY; // Get the copyeditor submission $copyeditorSubmission =& $this->getAuthorizedContextObject(ASSOC_TYPE_ARTICLE); if (!is_a($copyeditorSubmission, 'CopyeditorSubmission')) return AUTHORIZATION_DENY; // Copyeditors can only access submissions // they have been explicitly assigned to. if ($copyeditorSubmission->getUserIdBySignoffType('SIGNOFF_COPYEDITING_INITIAL') != $user->getId()) return AUTHORIZATION_DENY; return AUTHORIZATION_PERMIT; } } ?>