Assembla home | Assembla project page
 

Changeset 123 for tags

Show
Ignore:
Timestamp:
07/19/07 16:43:27 (1 year ago)
Author:
digitalspaghetti
Message:

Creating my own tags directory for code changing othAuth to Auth - currently not working

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • tags/tane/app_controller.php

    r119 r123  
    4040         
    4141        var $helpers = array('othAuth','Cache','Form','Html','Javascript','Text','Number','Time','Tree','Webrocket'); 
    42         var $components = array('othAuth','Conf','RequestHandler','Session','Nav','Openid'); 
    43         var $othAuthRestrictions = array('add','edit','delete',CAKE_ADMIN); 
     42        var $components = array('othAuth','Conf','RequestHandler','Session','Nav','Openid','Acl','Auth'); 
     43        var $publicControllers = array('posts'); 
    4444         
    4545        var $level = 0; 
    46          
    4746        /** 
    4847         *  Called before view 
     
    5150        function beforeFilter() 
    5251        { 
    53                 $auth_conf = array('mode' => 'oth', 'login_page' => '/users/login', 'logout_page' => '/users/logout', 'access_page' => '/', 'hashkey' => CAKE_SESSION_STRING, 'noaccess_page' => '/users/noaccess', 'strict_gid_check' => false, 'history_active' => true, 'login_limit' => true, 'gid_order' => 'DESC'); 
    54                 $this->othAuth->controller = &$this; 
    55                 $this->othAuth->init($auth_conf); 
    56                 $this->othAuth->check(); 
    57                  
    58                 $level_check = $this->othAuth->group('level'); 
    59         if (!empty($level_check)) $this->level = $level_check; 
     52                if (isset($this->Auth)) { 
     53                $this->Auth->userScope = array('User.active' => 1); 
     54                $this->Auth->loginAction = '/users/login'; 
     55                $this->Auth->loginRedirect = '/posts/index'; 
     56                $this->Auth->fields = array('username' => 'username', 'password' => 'passwd'); 
     57                $this->Auth->authorize = 'actions'; 
     58 
     59                if (in_array(low($this->params['controller']), $this->publicControllers)) { 
     60                        $this->Auth->allow(); 
     61                } 
     62        } 
    6063        } 
    6164 
  • tags/tane/app_model.php

    r118 r123  
    4747         */ 
    4848        var $actsAs = array(/*'Utf8' => array('save' => array('convertTo' => 'UTF-8'),'read'=>array('useMbstring'=>false)),*/ 
    49                                                 'Containable' 
     49                                                'Containable', 
     50                                                'Acl' 
    5051        ); 
    5152         
  • tags/tane/controllers/users_controller.php

    r121 r123  
    130130                        { 
    131131                                $this->Session->del('element_data.Nav'); 
    132                                 if ($this->Conf->get('general.enable_captcha')) 
    133                                 { 
    134                                         if (!$this->Session->read('captcha') == $this->data['User']['captcha_check'] ) 
    135                                         { 
    136                                                 return false; 
    137                                         } 
    138                                 } 
    139                                 $auth_num = $this->othAuth->login($this->data['User']); 
    140                                 $this->set('auth_msg', $this->othAuth->getMsg($auth_num)); 
     132                                $this->Auth->login($this->data); 
    141133                        } else if ($this->data['User']['openid']) { 
    142134                                $this->Session->del('element_data.Nav'); 
     
    151143                        $this->log($response); 
    152144                        if ($this->User->findByOpenid($response->identity_url) ) { 
     145                                $this->Auth->login($response); 
    153146                                                $this->Session->setFlash('User Authenticated Success ' . $response->signed_args['openid.sreg.nickname']); 
    154147                                                $this->Session->write('username', $response->signed_args['openid.sreg.nickname']); 
     
    165158        function logout() 
    166159        { 
    167                 $this->othAuth->logout(); 
     160                $this->Auth->logout(); 
    168161                $this->Session->setFlash('You are now logged out'); 
    169162                $this->redirect('/'); 
  • tags/tane/models/group.php

    r55 r123  
    2525                                                                'counterQuery' => ''), 
    2626        ); 
    27  
    28         var $hasAndBelongsToMany = array( 
    29                         'Permission' => array('className' => 'Permission', 
    30                                                 'joinTable' => 'groups_permissions', 
    31                                                 'foreignKey' => 'group_id', 
    32                                                 'associationForeignKey' => 'permission_id', 
    33                                                 'conditions' => '', 
    34                                                 'fields' => '', 
    35                                                 'order' => '', 
    36                                                 'limit' => '', 
    37                                                 'offset' => '', 
    38                                                 'unique' => '', 
    39                                                 'finderQuery' => '', 
    40                                                 'deleteQuery' => '', 
    41                                                 'insertQuery' => ''), 
    42         ); 
    43  
    4427} 
    4528?>