/**
  * Constructor
  */
 function SelectableCopyeditFilesGridHandler()
 {
     import('lib.pkp.controllers.grid.files.SubmissionFilesGridDataProvider');
     // Pass in null stageId to be set in initialize from request var.
     parent::SelectableFileListGridHandler(new SubmissionFilesGridDataProvider(SUBMISSION_FILE_COPYEDIT, true), null, FILE_GRID_VIEW_NOTES);
     $this->addRoleAssignment(array(ROLE_ID_MANAGER, ROLE_ID_SUB_EDITOR, ROLE_ID_ASSISTANT), array('fetchGrid', 'fetchRow'));
     // Set the grid title.
     $this->setTitle('submission.copyedited');
 }
 /**
  * Constructor
  */
 function __construct()
 {
     import('lib.pkp.controllers.grid.files.SubmissionFilesGridDataProvider');
     // Pass in null stageId to be set in initialize from request var.
     parent::__construct(new SubmissionFilesGridDataProvider(SUBMISSION_FILE_SUBMISSION), null, FILE_GRID_ADD | FILE_GRID_VIEW_NOTES);
     $this->addRoleAssignment(array(ROLE_ID_MANAGER, ROLE_ID_SUB_EDITOR, ROLE_ID_ASSISTANT), array('fetchGrid', 'fetchRow'));
     // Set the grid title.
     $this->setTitle('submission.submit.submissionFiles');
 }
 /**
  * Constructor
  */
 function __construct()
 {
     import('lib.pkp.controllers.grid.files.review.ReviewRevisionsGridDataProvider');
     // Pass in null stageId to be set in initialize from request var.
     parent::__construct(new ReviewRevisionsGridDataProvider(), null, FILE_GRID_DELETE | FILE_GRID_VIEW_NOTES | FILE_GRID_EDIT);
     $this->addRoleAssignment(array(ROLE_ID_MANAGER, ROLE_ID_SUB_EDITOR, ROLE_ID_ASSISTANT), array('fetchGrid', 'fetchRow'));
     // Set the grid information.
     $this->setTitle('editor.submission.revisions');
 }
 /**
  * Constructor
  */
 function EditorReviewAttachmentsGridHandler()
 {
     import('controllers.grid.files.SubmissionFilesGridDataProvider');
     $dataProvider = new SubmissionFilesGridDataProvider(WORKFLOW_STAGE_ID_INTERNAL_REVIEW, MONOGRAPH_FILE_REVIEW);
     parent::SelectableFileListGridHandler($dataProvider, WORKFLOW_STAGE_ID_INTERNAL_REVIEW, FILE_GRID_ADD | FILE_GRID_DOWNLOAD_ALL);
     $this->addRoleAssignment(array(ROLE_ID_SERIES_EDITOR, ROLE_ID_PRESS_MANAGER), array('fetchGrid', 'fetchRow', 'downloadAllFiles'));
     // Set the grid title.
     $this->setTitle('grid.reviewAttachments.title');
 }
 /**
  * Constructor
  */
 function __construct()
 {
     import('lib.pkp.controllers.grid.files.review.ReviewGridDataProvider');
     // Pass in null stageId to be set in initialize from request var.
     parent::__construct(new ReviewGridDataProvider(SUBMISSION_FILE_REVIEW_ATTACHMENT), null, FILE_GRID_DELETE | FILE_GRID_VIEW_NOTES | FILE_GRID_EDIT);
     $this->addRoleAssignment(array(ROLE_ID_MANAGER, ROLE_ID_SUB_EDITOR, ROLE_ID_ASSISTANT), array('fetchGrid', 'fetchRow'));
     // Set the grid title.
     $this->setTitle('grid.reviewAttachments.title');
 }
 /**
  * @copydoc PKPHandler::authorize()
  */
 function authorize($request, &$args, $roleAssignments)
 {
     if ($reviewAssignmentId = $request->getUserVar('reviewAssignmentId')) {
         // If a review assignment ID is specified, preload the
         // checkboxes with the currently selected files. To do
         // this, we'll need the review assignment in the context.
         // Add the required policies:
         // 1) Review stage access policy (fetches submission in context)
         import('classes.security.authorization.ReviewStageAccessPolicy');
         $this->addPolicy(new ReviewStageAccessPolicy($request, $args, $roleAssignments, 'submissionId', $request->getUserVar('stageId')));
         // 2) Review assignment
         import('lib.pkp.classes.security.authorization.internal.ReviewAssignmentRequiredPolicy');
         $this->addPolicy(new ReviewAssignmentRequiredPolicy($request, $args, 'reviewAssignmentId', array('fetchGrid', 'fetchRow')));
     }
     return parent::authorize($request, $args, $roleAssignments);
 }