Skip to content

Commit

Permalink
mass actions were not working but now are... WTF
Browse files Browse the repository at this point in the history
  • Loading branch information
dogmatic69 committed Feb 22, 2010
1 parent 96f1cda commit 27ce811
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions app_controller.php
Expand Up @@ -49,12 +49,8 @@ class AppController extends Controller {

function beforeFilter() {
parent::beforeFilter();
//$this->Auth->allow('*');
$this->Auth->allowedActions = array('display', 'login', 'logout');

if (!isset($this->params['prefix']) || $this->params['prefix'] != 'admin') {
$this->Auth->allow('*');
}
$this->__setupAuth();

if (isset($this->data['PaginationOptions']['pagination_limit'])) {
$this->Infinitas->changePaginationLimit( $this->data['PaginationOptions'], $this->params );
Expand Down Expand Up @@ -87,14 +83,19 @@ function beforeFilter() {
}
}

$this->__setupAuth();
}

function beforeRender(){
parent::beforeRender();
}

function __setupAuth(){
//$this->Auth->allow('*');
$this->Auth->allowedActions = array('display', 'login', 'logout');

if (!isset($this->params['prefix']) || $this->params['prefix'] != 'admin') {
$this->Auth->allow('*');
}
$this->Auth->actionPath = 'controllers/';
$this->Auth->authorize = 'actions';
$this->Auth->loginAction = array('plugin' => 'management', 'controller' => 'users', 'action' => 'login');
Expand All @@ -105,7 +106,16 @@ function __setupAuth(){
if (isset($this->params['prefix']) && $this->params['prefix'] == 'admin') {
$this->Auth->loginRedirect = '/admin';
}

$this->Auth->logoutRedirect = '/';

$this->Security->blackHoleCallback = 'blackHole';
}

function blackHole(&$controller, $error){
pr('you been blackHoled');
pr($error);
exit;
}


Expand Down

0 comments on commit 27ce811

Please sign in to comment.