Skip to content

Commit

Permalink
stop non admins from using admin (temp fix)
Browse files Browse the repository at this point in the history
  • Loading branch information
dogmatic69 committed Jun 11, 2010
1 parent 7612f87 commit c3928be
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app_controller.php
Expand Up @@ -101,6 +101,10 @@ function beforeFilter() {
}
}

if((isset($this->params['admin']) && $this->params['admin']) && $this->params['action'] != 'admin_login' && $this->Session->read('Auth.User.group_id') != 1){
$this->redirect(array('admin' => 1, 'plugin' => 'management', 'controller' => 'users', 'action' => 'login'));
}

if (isset($this->data['PaginationOptions']['pagination_limit'])) {
$this->Infinitas->changePaginationLimit( $this->data['PaginationOptions'], $this->params );
}
Expand Down

0 comments on commit c3928be

Please sign in to comment.