addPolicy(new SectionEditorSubmissionRequiredPolicy($request, $args, $submissionParameterName)); $editorRolesPolicy = new PolicySet(COMBINING_PERMIT_OVERRIDES); // Editors can access all operations. $editorRolesPolicy->addPolicy(new RoleBasedHandlerOperationPolicy($request, ROLE_ID_EDITOR, $roleAssignments[ROLE_ID_EDITOR])); // Section editors $sectionEditorPolicy = new PolicySet(COMBINING_DENY_OVERRIDES); // 1) Section editors can access all remote operations ... $sectionEditorPolicy->addPolicy(new RoleBasedHandlerOperationPolicy($request, ROLE_ID_SECTION_EDITOR, $roleAssignments[ROLE_ID_SECTION_EDITOR])); // 2) ... but only if the requested submission has been explicitly assigned to them. import('classes.security.authorization.internal.SectionSubmissionAssignmentPolicy'); $sectionEditorPolicy->addPolicy(new SectionSubmissionAssignmentPolicy($request)); $editorRolesPolicy->addPolicy($sectionEditorPolicy); $editorsPolicy->addPolicy($editorRolesPolicy); $submissionEditingPolicy->addPolicy($editorsPolicy); // // Copyeditor policy // $copyeditorPolicy = new PolicySet(COMBINING_DENY_OVERRIDES); // 1) Copyeditors can only access editorial components when a valid // copyeditor submission is in the request ... import('classes.security.authorization.internal.CopyeditorSubmissionRequiredPolicy'); $copyeditorPolicy->addPolicy(new CopyeditorSubmissionRequiredPolicy($request, $args, $submissionParameterName)); // 2) ... If that's the case then copyeditors can access all remote operations ... $copyeditorPolicy->addPolicy(new RoleBasedHandlerOperationPolicy($request, ROLE_ID_COPYEDITOR, $roleAssignments[ROLE_ID_SECTION_EDITOR])); // 3) ... but only if the requested submission has been explicitly assigned to them. import('classes.security.authorization.internal.CopyeditorSubmissionAssignmentPolicy'); $copyeditorPolicy->addPolicy(new CopyeditorSubmissionAssignmentPolicy($request)); $submissionEditingPolicy->addPolicy($copyeditorPolicy); // Add the submission editing policies to this policy set. $this->addPolicy($submissionEditingPolicy); } } ?>