Changeset 136
- Timestamp:
- 07/23/07 17:12:28 (1 year ago)
- Files:
-
- branch/app_controller.php (modified) (2 diffs)
- branch/models/group.php (modified) (3 diffs)
- branch/models/user.php (modified) (1 diff)
- branch/webroot/js/ui.mouse.js (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branch/app_controller.php
r132 r136 42 42 var $components = array('othAuth','Conf','RequestHandler','Session','Nav','Openid'); 43 43 var $othAuthRestrictions = array('add','edit','delete',CAKE_ADMIN); 44 44 var $publicControllers = array('pages'); 45 45 var $level = 0; 46 46 … … 58 58 $level_check = $this->othAuth->group('level'); 59 59 if (!empty($level_check)) $this->level = $level_check; 60 61 /* Not replaced ACL Yet*/ 62 /* 63 if (isset($this->Auth)) { 64 $this->Auth->userScope = array('User.disabled' => 0); 65 $this->Auth->loginAction = '/users/login'; 66 $this->Auth->loginRedirect = '/users/account'; 67 $this->Auth->fields = array('username' => 'username', 'password' => 'passwd'); 68 $this->Auth->authorize = 'actions'; 69 70 if (in_array(low($this->params['controller']), $this->publicControllers)) { 71 $this->Auth->allow(); 72 } 73 }*/ 74 60 75 61 76 $sitetheme = "default"; branch/models/group.php
r55 r136 10 10 'users_count' => VALID_NOT_EMPTY, 11 11 ); 12 13 //var $actsAs = array('Acl'); 12 14 13 15 //The Associations below have been created with all possible keys, those that are not needed can be removed … … 26 28 ); 27 29 28 var $hasAndBelongsToMany = array(30 /*var $hasAndBelongsToMany = array( 29 31 'Permission' => array('className' => 'Permission', 30 32 'joinTable' => 'groups_permissions', … … 40 42 'deleteQuery' => '', 41 43 'insertQuery' => ''), 42 ); 44 );*/ 45 46 function parentNode(){ 47 if (!$this->id) { 48 return null; 49 } 50 51 $data = $this->read(); 52 53 if (!$data['Group']['parent_id']){ 54 return null; 55 } else { 56 return $data['Group']['parent_id']; 57 } 58 } 43 59 44 60 } branch/models/user.php
r133 r136 49 49 ); 50 50 51 51 function parentNode(){ 52 if (!$this->id) { 53 return null; 54 } 55 56 $data = $this->read(); 57 58 if (!$data['User']['group_id']){ 59 return null; 60 } else { 61 return array('model' => 'Group', 'foreign_key' => $data['User']['group_id']); 62 } 63 } 52 64 53 65 }