| 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; |