Skip to content

Instantly share code, notes, and snippets.

@zackperdue
Created February 8, 2013 01:18
Show Gist options
  • Save zackperdue/4735794 to your computer and use it in GitHub Desktop.
Save zackperdue/4735794 to your computer and use it in GitHub Desktop.
$controller = Request::current()->controller();
$action = Request::current()->action();
$directory = Request::current()->directory();
$controller_name = ($directory)? $directory.'_'.$controller : $controller;
if ( ! $this->a2->allowed($controller_name, $action))
{
HTTP::redirect(Route::url('account', array('action' => 'login')));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment