Implemented delete group feature in group editor.
[timetracker.git] / report_send.php
index b420b3a..9bbf9f5 100644 (file)
@@ -33,7 +33,7 @@ import('ttSysConfig');
 import('ttReportHelper');
 
 // Access check.
-if (!ttAccessAllowed('view_own_reports')) {
+if (!(ttAccessAllowed('view_own_reports') || ttAccessAllowed('view_reports'))) {
   header('Location: access_denied.php');
   exit();
 }
@@ -72,8 +72,10 @@ if ($request->isPost()) {
 
     // Obtain session bean with report attributes.
     $bean = new ActionForm('reportBean', new Form('reportForm'));
+    $options = ttReportHelper::getReportOptions($bean);
+
     // Prepare report body.
-    $body = ttReportHelper::prepareReportBody($bean, $cl_comment);
+    $body = ttReportHelper::prepareReportBody($options, $cl_comment);
 
     import('mail.Mailer');
     $mailer = new Mailer();