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/comments_controller.php

    r526 r538  
    2323    $this->Auth->allow(array('view', 'add')); 
    2424 } 
    25   
     25   
    2626 public function isAuthorized()  
    2727 {       
    2828   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 
     29       if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ):  // admin and teachers 
    3030         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; 
    3537 } 
    36  
    37  
     38  
    3839 public function view($username=null, $entry_id=null) 
    3940 {