CakePHP: PagesController with Admin Routing
For small Cake websites with admin routing enabled, I like to use the Auth component to require a login for all admin routes, and allow access to everything else using the following beforeFilter in the AppController superclass:
function beforeFilter(){
$admin = Configure::read('Routing.admin');
if (isset($this->params[$admin]) and $this->params[$admin]){
[...]
Posted on April 7th, 2009 by Dave
Filed under: CakePHP, Technology, Web | 11 Comments »