2 class AppController
extends Controller
{
4 var $components = array('RequestHandler', 'Auth');
5 var $helpers = array('Html', 'Form');
7 var $allowedActions = array();
9 function beforeFilter() {
10 Configure
::write('Config.language', 'en');
12 if (Configure
::read('debug') > 1) {
13 if ($this->RequestHandler
->isAjax()) {
14 Configure
::write('ajaxdebug', 1);
21 function _setupAuth() {
23 if (Configure
::read('Settings.auth.enabled')) {
25 $availableOptions = array_keys(get_object_vars($this->Auth
));
26 $options = Configure
::read('Settings.auth.options');
28 foreach ($options as $option => $value) {
29 if (in_array($option, $availableOptions)) {
30 $this->Auth
->$option = $value;
34 if (!empty($this->allowedActions
)) {
35 $this->Auth
->allow($this->allowedActions
);
44 function isAuthorized() {