Show
Ignore:
Timestamp:
05/21/08 01:02:56 (8 months ago)
Author:
aarkerio
Message:

New Try

Files:
1 modified

Legend:

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

    r533 r538  
    1818  public $components    = array('Adds'); 
    1919 
    20   public function beforeFilter() 
    21   { 
     20 public function beforeFilter() 
     21 { 
    2222     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; 
    3336 } 
    3437