コード例 #1
0
ファイル: Controller.php プロジェクト: yagrysha/mvc
 private function checkAccess()
 {
     if (empty($this->access[$this->params['action']]) || $this->user->hasRole($this->access[$this->params['action']])) {
         return true;
     }
     throw new Exception(Exception::TYPE_ACCESSDENIED, $this->params);
 }
コード例 #2
0
ファイル: App.php プロジェクト: yagrysha/mvc
 private function checkAccess($module, $controller)
 {
     if (empty($this->conf['access'][$module][$controller]) || $this->user->hasRole($this->conf['access'][$module][$controller])) {
         return true;
     }
     throw new Exception(Exception::TYPE_ACCESSDENIED);
 }