2009-09-09 20:23:39 -07:00
|
|
|
<?php
|
|
|
|
|
/* App Controller */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class AppController extends Controller {
|
|
|
|
|
|
2010-01-10 15:34:31 -08:00
|
|
|
var $components = array('Auth', 'RequestHandler');
|
2009-09-09 20:23:39 -07:00
|
|
|
|
2010-01-10 15:34:31 -08:00
|
|
|
var $helpers = array('Javascript', 'Time', 'Html', 'Form', 'Ajax');
|
|
|
|
|
function beforeFilter() {
|
|
|
|
|
$this->set('currentuser', $this->Auth->user());
|
2010-01-10 10:05:04 -08:00
|
|
|
|
|
|
|
|
|
2010-01-10 15:34:31 -08:00
|
|
|
$this->Auth->loginAction = array('controller' => 'users', 'action' => 'login');
|
|
|
|
|
$this->Auth->loginRedirect = array('controller' => 'enquiries', 'action' => 'index');
|
|
|
|
|
$this->Auth->allow('display');
|
|
|
|
|
$this->Auth->authorize = 'controller';
|
2010-01-10 10:05:04 -08:00
|
|
|
|
|
|
|
|
|
2010-01-10 15:34:31 -08:00
|
|
|
/**
|
|
|
|
|
* Define the scheme for issue Types.
|
|
|
|
|
*/
|
|
|
|
|
$this->set('issueTypes', array(1=>"Bug Report", 2=>"Feature Request", 3=>"Other IT Help"));
|
|
|
|
|
|
|
|
|
|
$priorities = array(1 => 'Low',2=>"Medium",3=>"High", 4=>"Critical");
|
|
|
|
|
$this->set('issuePriorities', $priorities);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($this->RequestHandler->isAjax()) {
|
|
|
|
|
Configure::write('debug', 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function isAuthorized() {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
2009-09-09 20:23:39 -07:00
|
|
|
|
2010-01-10 10:05:04 -08:00
|
|
|
|
2009-09-09 20:23:39 -07:00
|
|
|
}
|
2009-10-10 00:06:46 -07:00
|
|
|
?>
|