From d9bd6f844a801be23d7528e686fdac8415be0ff2 Mon Sep 17 00:00:00 2001
From: RomanSteinberg <romanofficial@yandex.ru>
Date: Thu, 3 Sep 2015 23:17:49 +0300
Subject: [PATCH] FIX: access to students list

---
 .../application/classes/Controller/Handler/Students.php     | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/~dev_rating/application/classes/Controller/Handler/Students.php b/~dev_rating/application/classes/Controller/Handler/Students.php
index fe18f8b9b..32a544e35 100644
--- a/~dev_rating/application/classes/Controller/Handler/Students.php
+++ b/~dev_rating/application/classes/Controller/Handler/Students.php
@@ -5,11 +5,11 @@ class Controller_Handler_Students extends Controller_Handler
     public function before() {
         parent::before();
 
-        $this->user->checkAccess(User::RIGHTS_ADMIN);
+        $this->user->checkAccess(User::RIGHTS_ADMIN | User::RIGHTS_DEAN);
     }
 
     public function action_create() {
-        $this->user->checkAccess(User::RIGHTS_ADMIN);
+//        $this->user->checkAccess(User::RIGHTS_ADMIN);
 
         $student = Model_Student::make()
             ->faculty($this->post['facultyID'])
@@ -25,8 +25,6 @@ class Controller_Handler_Students extends Controller_Handler
     }
 
     public function action_search() {
-        $this->user->checkAccess(User::RIGHTS_ADMIN | User::RIGHTS_DEAN);
-
         $facultyID = $this->post['FacultyID'] ? $this->post['FacultyID'] : $this->user->Faculty->ID;
         $gradeID = $this->post['GradeID'];
         $groupID = $this->post['GroupID'];
-- 
GitLab