Changeset 339 for trunk/app/controllers/colleges_controller.php
- Timestamp:
- 03/24/08 17:06:55 (10 months ago)
- Files:
-
- 1 modified
-
trunk/app/controllers/colleges_controller.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/controllers/colleges_controller.php
r274 r339 3 3 * Karamelo E-Learning Platform 4 4 * Manuel Montoya 2002-2008 5 * GPL License manuel<at>mononeurona<punto>org5 * GPLv3 License manuel<at>mononeurona<punto>org 6 6 * Chipotle Software TM 7 7 */ … … 15 15 public $components = array('Portal'); 16 16 17 public function beforeFilter() 18 { 19 $this->Auth->allow(array('view')); 20 parent::beforeFilter(); 21 } 22 17 23 public function isAuthorized() 18 { 19 if ( $this->action == 'delete')20 {21 if ($this->Auth->user('group_id') == 1) 22 {24 { 25 if (isset( $this->params[Configure::read('Routing.admin')] )) 26 { 27 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ) // admin and teachers 28 { 23 29 return true; 24 } else { 25 return false; 26 } 27 } 28 29 return true; 30 } 31 } 32 return false; // go away !! 30 33 } 34 31 35 32 36 public function view()
