Some internal reorg

This commit is contained in:
Deon George
2014-09-29 22:06:38 +10:00
parent 9ae0980221
commit 037633f084
25 changed files with 710 additions and 59 deletions

View File

@@ -56,7 +56,9 @@ abstract class lnApp_Controller_TemplateDefault extends Kohana_Controller_Templa
* @return boolean
*/
protected function _auth_required() {
return FALSE;
return (($this->auth_required !== FALSE && Auth::instance()->logged_in(NULL,get_class($this).'|'.__METHOD__) === FALSE) ||
(is_array($this->secure_actions) && array_key_exists($this->request->action(),$this->secure_actions) &&
! Auth::instance()->logged_in($this->secure_actions[$this->request->action()],get_class($this).'|'.__METHOD__)));
}
/**

View File

@@ -0,0 +1,19 @@
<?php defined('SYSPATH') or die('No direct script access.');
/**
* Main home page
*
* @package lnApp
* @category Controllers/User
* @author Deon George
* @copyright (c) 2009-2013 Deon George
* @license http://dev.leenooks.net/license.html
*/
abstract class lnApp_Controller_User_Welcome extends Controller_Welcome {
protected $auth_required = TRUE;
public function action_index() {
throw HTTP_Exception::factory(500,'Site not setup!');
}
}
?>

View File

@@ -0,0 +1,19 @@
<?php defined('SYSPATH') or die('No direct script access.');
/**
* Main home page for un-authenticated users
*
* @package lnApp
* @category Controllers
* @author Deon George
* @copyright (c) 2009-2013 Deon George
* @license http://dev.leenooks.net/license.html
*/
abstract class lnApp_Controller_Welcome extends Controller_TemplateDefault {
protected $auth_required = FALSE;
public function action_index() {
throw HTTP_Exception::factory(500,'Site not setup!');
}
}
?>