Changeset 538
- Timestamp:
- 05/21/08 01:02:56 (6 months ago)
- Location:
- trunk/app
- Files:
-
- 47 modified
-
app_controller.php (modified) (1 diff)
-
controllers/acquaintances_controller.php (modified) (1 diff)
-
controllers/answers_controller.php (modified) (1 diff)
-
controllers/categories_controller.php (modified) (1 diff)
-
controllers/catfaqs_controller.php (modified) (1 diff)
-
controllers/catforums_controller.php (modified) (1 diff)
-
controllers/catglossaries_controller.php (modified) (1 diff)
-
controllers/colleges_controller.php (modified) (1 diff)
-
controllers/comments_controller.php (modified) (1 diff)
-
controllers/confirms_controller.php (modified) (1 diff)
-
controllers/discussions_controller.php (modified) (1 diff)
-
controllers/ecourses_controller.php (modified) (1 diff)
-
controllers/entries_controller.php (modified) (1 diff)
-
controllers/events_controller.php (modified) (1 diff)
-
controllers/faqs_controller.php (modified) (1 diff)
-
controllers/forums_controller.php (modified) (1 diff)
-
controllers/galleries_controller.php (modified) (1 diff)
-
controllers/glossaries_controller.php (modified) (1 diff)
-
controllers/groups_controller.php (modified) (1 diff)
-
controllers/helps_controller.php (modified) (1 diff)
-
controllers/images_controller.php (modified) (1 diff)
-
controllers/lessons_controller.php (modified) (1 diff)
-
controllers/medias_controller.php (modified) (1 diff)
-
controllers/messages_controller.php (modified) (1 diff)
-
controllers/news_controller.php (modified) (1 diff)
-
controllers/newsletters_controller.php (modified) (1 diff)
-
controllers/participations_controller.php (modified) (1 diff)
-
controllers/podcasts_controller.php (modified) (1 diff)
-
controllers/pollrows_controller.php (modified) (1 diff)
-
controllers/polls_controller.php (modified) (1 diff)
-
controllers/questions_controller.php (modified) (1 diff)
-
controllers/quotes_controller.php (modified) (1 diff)
-
controllers/recovers_controller.php (modified) (1 diff)
-
controllers/replies_controller.php (modified) (1 diff)
-
controllers/results_controller.php (modified) (1 diff)
-
controllers/shares_controller.php (modified) (1 diff)
-
controllers/subjects_controller.php (modified) (1 diff)
-
controllers/tests_controller.php (modified) (1 diff)
-
controllers/themeblogs_controller.php (modified) (1 diff)
-
controllers/themes_controller.php (modified) (1 diff)
-
controllers/topics_controller.php (modified) (1 diff)
-
controllers/treasures_controller.php (modified) (1 diff)
-
controllers/users_controller.php (modified) (1 diff)
-
controllers/vclassrooms_controller.php (modified) (1 diff)
-
controllers/webquests_controller.php (modified) (1 diff)
-
controllers/wikis_controller.php (modified) (1 diff)
-
views/acquaintances/admin_edit.ctp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/app_controller.php
r491 r538 24 24 $this->Auth->loginError = 'Invalid e-mail / password combination. Please try again'; 25 25 $this->Auth->authorize = 'controller'; 26 $this->Auth->autoRedirect = true;27 26 $this->Auth->deny('*'); 28 27 29 28 $this->set('cU', $this->Auth->user()); // $cU current user array to use in the views if user logged in 30 29 } 31 30 32 31 public function msgFlash($msg, $to) 33 32 { -
trunk/app/controllers/acquaintances_controller.php
r526 r538 29 29 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 30 30 return true; 31 else: 32 return false; 31 33 endif; 32 endif; 33 return false; // go away !! 34 endif; 35 36 return true; 34 37 } 35 38 -
trunk/app/controllers/answers_controller.php
r526 r538 23 23 public function isAuthorized() 24 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 { 29 return true; 30 } 31 } 32 return false; // go away !! 25 if (isset( $this->params[Configure::read('Routing.admin')] )): 26 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 27 return true; 28 else: 29 return false; 30 endif; 31 endif; 32 33 return true; 33 34 } 34 35 -
trunk/app/controllers/categories_controller.php
r526 r538 21 21 parent::beforeFilter(); 22 22 } 23 24 public function isAuthorized() 25 { 23 24 public function isAuthorized() 25 { 26 26 if (isset( $this->params[Configure::read('Routing.admin')] )): 27 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 28 return true; 29 endif; 27 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 28 return true; 29 else: 30 return false; 31 endif; 30 32 endif; 31 return false; // go away !!32 }33 33 34 public function index($order = null) 35 { 34 return true; 35 } 36 37 public function index($order = null) 38 { 36 39 $this->layout = 'admin'; 37 40 $this->pageTitle = 'Categories'; -
trunk/app/controllers/catfaqs_controller.php
r510 r538 26 26 public function isAuthorized() 27 27 { 28 if (isset( $this->params[Configure::read('Routing.admin')] )) 29 { 30 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ) // admin and teachers 31 { 32 return true; 33 } 34 } 35 return false; // go away !! 28 if (isset( $this->params[Configure::read('Routing.admin')] )): 29 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 30 return true; 31 else: 32 return false; 33 endif; 34 endif; 35 36 return true; 36 37 } 37 38 -
trunk/app/controllers/catforums_controller.php
r526 r538 24 24 } 25 25 26 public function isAuthorized() 27 { 26 public function isAuthorized() 27 { 28 28 if (isset( $this->params[Configure::read('Routing.admin')] )): 29 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 30 return true; 31 endif; 29 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 30 return true; 31 else: 32 return false; 33 endif; 32 34 endif; 33 return false; // go away !! 35 36 return true; 34 37 } 35 38 -
trunk/app/controllers/catglossaries_controller.php
r526 r538 27 27 { 28 28 if (isset( $this->params[Configure::read('Routing.admin')] )): 29 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 30 return true; 31 endif; 29 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 30 return true; 31 else: 32 return false; 33 endif; 32 34 endif; 33 return false; // go away !! 35 36 return true; 34 37 } 35 38 -
trunk/app/controllers/colleges_controller.php
r510 r538 27 27 { 28 28 if (isset( $this->params[Configure::read('Routing.admin')] )): 29 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers29 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 30 30 return true; 31 endif; 32 endif; 33 return false; // go away !! 31 else: 32 return false; 33 endif; 34 endif; 35 36 return true; 34 37 } 35 36 38 37 39 public function view() -
trunk/app/controllers/comments_controller.php
r526 r538 23 23 $this->Auth->allow(array('view', 'add')); 24 24 } 25 25 26 26 public function isAuthorized() 27 27 { 28 28 if (isset( $this->params[Configure::read('Routing.admin')] )): 29 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers29 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 30 30 return true; 31 endif; 32 endif; 33 34 return false; // go away !! 31 else: 32 return false; 33 endif; 34 endif; 35 36 return true; 35 37 } 36 37 38 38 39 public function view($username=null, $entry_id=null) 39 40 { -
trunk/app/controllers/confirms_controller.php
r526 r538 23 23 { 24 24 if (isset( $this->params[Configure::read('Routing.admin')] )): 25 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 26 return true; 27 endif; 28 endif; 29 return false; // go away !! 25 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 26 return true; 27 else: 28 return false; 29 endif; 30 endif; 31 32 return true; 30 33 } 31 34 -
trunk/app/controllers/discussions_controller.php
r537 r538 28 28 endif; 29 29 } 30 30 31 31 public function isAuthorized() 32 32 { 33 33 if (isset( $this->params[Configure::read('Routing.admin')] )): 34 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 35 return true; 36 endif; 34 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 35 return true; 36 else: 37 return false; 38 endif; 37 39 endif; 38 return false; // go away !! 40 41 return true; 39 42 } 40 43 41 44 public function add() 42 45 { -
trunk/app/controllers/ecourses_controller.php
r526 r538 21 21 $this->Auth->allow(array('display')); 22 22 } 23 23 24 public function isAuthorized() 24 25 { 25 26 if (isset( $this->params[Configure::read('Routing.admin')] )): 26 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 27 return true; 28 endif; 27 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 28 return true; 29 else: 30 return false; 31 endif; 29 32 endif; 30 return false; // go away !! 33 34 return true; 31 35 } 36 32 37 33 38 /**** -
trunk/app/controllers/entries_controller.php
r528 r538 23 23 parent::beforeFilter(); 24 24 $this->Auth->allow(array('rss', 'search')); 25 } 25 } 26 26 27 27 public function isAuthorized() 28 28 { 29 if (isset( $this->params[Configure::read('Routing.admin')] )):30 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers29 if (isset( $this->params[Configure::read('Routing.admin')] )): 30 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 31 31 return true; 32 endif; 33 endif; 34 return false; // go away !! 32 else: 33 return false; 34 endif; 35 endif; 36 37 return true; 35 38 } 36 39 -
trunk/app/controllers/events_controller.php
r510 r538 25 25 $this->Auth->allow(array('display')); 26 26 } 27 28 public function isAuthorized() 29 { 30 if (isset( $this->params[Configure::read('Routing.admin')] )): 31 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 32 return true; 33 else: 34 return false; 35 endif; 36 endif; 37 38 return true; 39 } 40 27 41 28 42 public function calendar() -
trunk/app/controllers/faqs_controller.php
r526 r538 24 24 } 25 25 26 public function isAuthorized() 27 { 28 if (isset($this->params[Configure::read('Routing.admin')])): 29 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2): 30 return true; 31 endif; 26 public function isAuthorized() 27 { 28 if (isset( $this->params[Configure::read('Routing.admin')] )): 29 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 30 return true; 31 else: 32 return false; 33 endif; 32 34 endif; 33 return false; // go away!! 35 36 return true; 34 37 } 35 38 36 39 public function index($order = null) 37 40 { -
trunk/app/controllers/forums_controller.php
r510 r538 26 26 public function isAuthorized() 27 27 { 28 if (isset( $this->params[Configure::read('Routing.admin')] )) 29 { 30 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ) // admin and teachers 31 { 32 return true; 33 } 34 } 35 return false; // go away !! 28 if (isset( $this->params[Configure::read('Routing.admin')] )): 29 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 30 return true; 31 else: 32 return false; 33 endif; 34 endif; 35 36 return true; 36 37 } 37 38 -
trunk/app/controllers/galleries_controller.php
r510 r538 25 25 public function isAuthorized() 26 26 { 27 if (isset( $this->params[Configure::read('Routing.admin')] )) 28 { 29 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ) // admin and teachers 30 { 31 return true; 32 } 33 } 34 return false; // go away !! 27 if (isset( $this->params[Configure::read('Routing.admin')] )): 28 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 29 return true; 30 else: 31 return false; 32 endif; 33 endif; 34 35 return true; 35 36 } 36 37 38 public function index($id = null) 39 { 37 38 public function index($id = null) 39 { 40 40 $this->pageTitle = 'View Active Users'; 41 41 $this->set('data', $this->User->findAll()); 42 42 $this->set('color', 'blue'); 43 }43 } 44 44 45 public function listview()46 {45 public function listview() 46 { 47 47 $this->layout = 'popup'; 48 48 -
trunk/app/controllers/glossaries_controller.php
r526 r538 22 22 parent::beforeFilter(); 23 23 } 24 24 25 25 26 public function isAuthorized() 26 27 { 27 28 if (isset( $this->params[Configure::read('Routing.admin')] )): 28 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers29 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 29 30 return true; 30 endif; 31 endif; 32 return false; // go away !! 31 else: 32 return false; 33 endif; 34 endif; 35 36 return true; 33 37 } 34 38 35 39 public function display($username) 36 40 { -
trunk/app/controllers/groups_controller.php
r526 r538 21 21 } 22 22 23 public function isAuthorized() 24 { 25 if (isset( $this->params[Configure::read('Routing.admin')] )): 26 if ($this->Auth->user('group_id') == 1 ): // admin 27 return true; 28 endif; 29 endif; 30 return false; // go away !! 31 } 23 public function isAuthorized() 24 { 25 if (isset( $this->params[Configure::read('Routing.admin')] )): 26 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 27 return true; 28 else: 29 return false; 30 endif; 31 endif; 32 33 return true; 34 } 32 35 33 36 /** === ADMIN METHODS === **/ -
trunk/app/controllers/helps_controller.php
r526 r538 23 23 $this->Auth->allow(array('display', 'tour')); 24 24 } 25 25 26 26 public function isAuthorized() 27 27 { 28 28 if (isset( $this->params[Configure::read('Routing.admin')] )): 29 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 30 return true; 31 endif; 29 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 30 return true; 31 else: 32 return false; 33 endif; 32 34 endif; 33 return false; // go away !! 35 36 return true; 34 37 } 35 38 36 39 public function tour() 37 40 { -
trunk/app/controllers/images_controller.php
r533 r538 18 18 public $components = array('Adds'); 19 19 20 public function beforeFilter()21 {20 public function beforeFilter() 21 { 22 22 parent::beforeFilter(); 23 } 24 25 public function isAuthorized() 26 { 27 if (isset( $this->params[Configure::read('Routing.admin')] )): 28 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 29 return true; 30 endif; 31 endif; 32 return false; // go away !! 23 } 24 25 public function isAuthorized() 26 { 27 if (isset( $this->params[Configure::read('Routing.admin')] )): 28 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 29 return true; 30 else: 31 return false; 32 endif; 33 endif; 34 35 return true;
