Пример #1
0
 public function executeApprove(sfWebRequest $request)
 {
     if (!$this->getUser()->hasCredential(array('Administrator', 'Staff', 'Coordinator'), false)) {
         $this->getUser()->setFlash("warning", 'You don\'t have permission to access this url ' . $request->getReferer());
         $this->redirect('dashboard/index');
     }
     $report = MissionReportPeer::retrieveByPK($this->getRequestParameter('report_id'));
     $this->forward404Unless($report);
     $report->setApproved(1);
     $report->save();
     return sfView::NONE;
 }