Skip to main content
Topic: Authentication and reports (Read 2390 times) previous topic - next topic

Authentication and reports

Seems when ever you enable authentication to a project you loose the ability to use the reports page.  I assume this is because the logged in user session doesn't get verified in the report controller.. is there a quick work around or do I have to resort to hand coding this into the project?

Re: Authentication and reports

Reply #1

You can edit the ReportController.php and change the
BaseController to SecureController.

class ReportController extends BaseController{
   /**
     * Render All Records  in a  Data Table
     * @return Html View
     */
   function index(){
      $this->view->render("report/index.php" ,null,"report_layout.php");
   }
}

Re: Authentication and reports

Reply #2
Hi Emman,

Thanks for the suggestion, but doesn't seem to help.

With secure login enabled and report controller changed:
Quote
<?php

/**
 * Report Page Controller
 * @category  Controller
 */
class ReportController extends SecureController{
   /**
     * Render All Records  in a  Data Table
     * @return Html View
     */
   function index(){
      
      $this->view->render("report/index.php" ,null,"report_layout.php");
   }
}

I still have the issue of page 403 message:


any help to resolve this issue will be appreciated.

Thanks,



Re: Authentication and reports

Reply #3
Please also edit the "libs/PageAccessManager.php".  Add access to user roles that can access the "report".
Thanks.

 

Re: Authentication and reports

Reply #4
Thanks Emman,

That worked for now.
Code: [Select]
'administrator' =>
array(
'users' => array('list','view','accountedit','accountview','userregister','add','edit','delete'),
'report' => array('list')
)