16 import(
'lib.pkp.controllers.informationCenter.InformationCenterHandler');
17 import(
'lib.pkp.classes.core.JSONMessage');
18 import(
'classes.log.SubmissionEventLogEntry');
28 function authorize($request, &$args, $roleAssignments) {
29 $success = parent::authorize($request, $args, $roleAssignments);
33 $this->_isCurrentUserAssignedEditor =
false;
35 if (!empty($userAssignedRoles)) {
36 foreach ($userAssignedRoles as $stageId => $roles) {
37 if (array_intersect(array(ROLE_ID_SITE_ADMIN, ROLE_ID_MANAGER, ROLE_ID_SUB_EDITOR), $roles)) {
38 $this->_isCurrentUserAssignedEditor =
true;
44 if (array_intersect(array(ROLE_ID_SITE_ADMIN, ROLE_ID_MANAGER), $userGlobalRoles)) {
45 $this->_isCurrentUserAssignedEditor =
true;
49 if (!$this->_isCurrentUserAssignedEditor) {
61 $user = $request->getUser();
63 $userHasRole = $user->hasRole(array(ROLE_ID_MANAGER, ROLE_ID_SUB_EDITOR), $this->_submission->getContextId());
64 $templateMgr->assign(
'removeHistoryTab', !$userHasRole || !$this->_isCurrentUserAssignedEditor);
65 return parent::viewInformationCenter($args, $request);
77 import(
'lib.pkp.controllers.informationCenter.form.NewSubmissionNoteForm');
79 $notesForm->initData();
82 $templateMgr->assign(
'notesList', $this->
_listNotes($args, $request));
84 return new JSONMessage(
true, $notesForm->fetch($request));
95 import(
'lib.pkp.controllers.informationCenter.form.NewSubmissionNoteForm');
97 $notesForm->readInputData();
99 if ($notesForm->validate()) {
100 $notesForm->execute();
103 $this->
_logEvent($request, $this->_submission, SUBMISSION_LOG_NOTE_POSTED,
'SubmissionLog');
105 $user = $request->getUser();
108 $jsonViewNotesResponse = $this->
viewNotes($args, $request);
110 $json->setEvent(
'dataChanged');
111 $json->setEvent(
'noteAdded', $jsonViewNotesResponse->_content);
130 $dispatcher = $request->getDispatcher();
132 return $templateMgr->fetchJson(
'controllers/informationCenter/submissionHistory.tpl');
140 return $this->_submission->getId();
148 return ASSOC_TYPE_SUBMISSION;