Show
Ignore:
Timestamp:
05/21/08 11:43:42 (8 months ago)
Author:
aarkerio
Message:

New Try

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/controllers/events_controller.php

    r538 r540  
    1515class EventsController extends AppController 
    1616 
    17   public $helpers       = array('Html', 'Javascript', 'Ajax', 'Form'); 
     17 public $helpers       = array('Html', 'Javascript', 'Ajax', 'Form'); 
    1818    
    19   public $components    = array('Portal'); 
     19 public $components    = array('Portal'); 
    2020    
    21   public function beforeFilter()  
    22   { 
     21 public function beforeFilter()  
     22 { 
    2323    parent::beforeFilter(); 
    2424    // allow everyone to join 
    2525    $this->Auth->allow(array('display')); 
    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; 
    3926 } 
    4027  
    41     
    42   public function calendar() 
    43   {   
     28 public function calendar() 
     29 {   
    4430      $this->layout  = 'portal'; 
    4531