public function before()
 {
     parent::before();
     $this->template->bind_global('title', $this->_title);
     $this->_kuaas = Kuaas::instance();
 }
 protected function _init()
 {
     $this->_fields = array('id' => new Sprig_Field_Auto(), 'name' => new Sprig_Field_Char(array('empty' => FALSE, 'rules' => array('max_length' => array(50)))), 'password' => new Sprig_Field_KuaasPassword(array('empty' => FALSE, 'rules' => array('min_length' => array(6), 'max_length' => array(50)))), 'password_confirm' => new Sprig_Field_KuaasPassword(array('empty' => TRUE, 'in_db' => FALSE, 'rules' => array('matches' => array('password')))), 'email' => new Sprig_Field_Email(array('empty' => FALSE, 'unique' => TRUE)), 'website' => new Sprig_Field_Char(array('rules' => array('max_length' => array(100), 'url' => array()))), 'created' => new Sprig_Field_Timestamp(array('empty' => FALSE)), 'articles' => new Sprig_Field_HasMany(array('Model' => 'Article')), 'comments' => new Sprig_Field_HasMany(array('Model' => 'Comment')), 'roles' => new Sprig_Field_ManyToMany(array('Model' => 'Role')));
     $this->_kuaas = Kuaas::instance();
 }
 /**
  * Test the authorised state of the user vs action vs resource
  *
  * @return void
  * @author Sam de Freyssinet
  */
 protected function authorised()
 {
     return Kuaas::instance()->authorise($this, $this->request->action, $this->_user);
 }
 public function __construct(Request $request)
 {
     parent::__construct($request);
     $this->_config = Kohana_Config::instance()->load('ledger');
     $this->_user = Kuaas::instance()->get_user();
 }